Webpack Bundled JS Library With "Umd" Module System in Nodejs Throws Error: "Self" Is Not Defined
Fleeting- External reference: https://stackoverflow.com/questions/69288186/running-a-webpack-bundled-js-library-with-umd-module-system-in-nodejs-throws-e
After lots of time wasting I found the answer in a github issue of webpack.
I can use library.type: “umd” but I just have to add the following in my webpack configuration.
module.exports = { output: { globalObject: ’this’ // This line was missing } }