How to allow node' setImmediate in Webpack 5? The doc says I can set this property to true in the node object, but the build crashes, claiming that the configuration object that does not match the API schema.
My code is:
node: {
global: true,
__filename: false,
__dirname: false
// setImmediate: true (here commented, because it crashes otherwise)
},
I have same issue and I have solved with below steps
Please check your node_modules, and just install setimmediate from https://github.com/YuzuJS/setImmediate if you don't have this module.
Next step, just import "setimmediate" or require("setimmediate") on top of your main js file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With