score:0

thank you for the answers, the issue turned out exactly to be due to missing polyfills for node core modules.

in my case the i had to provide polyfill for process using provideplugin.

i did the same by adding below to my config

new webpack.provideplugin({
    process: "process/browser",
})

score:1

try to add node.global: true to your config:

node: {
  global: true
}

score:1

donedel0's comment was the correct solution for me.

node: {
  global: true
}

the reasoning behind this is webpack 5 does no longer include a polyfills for node modules, so you have to manually set each.

https://webpack.js.org/configuration/node/#nodeglobal

however its good to note that the docs does suggest using provideplugin instead of global.


Related Query

More Query from same tag