Update -- related: How to prepend module.exports = to webpack bundle?
I have webpack compile a simple module.exports = \"asdfasdf\" to foo.j
module.exports = \"asdfasdf\"
foo.j
I think you are missing the libraryTarget-setting. Adding libraryTarget: "commonjs2" to the config should fix the issue. See the webpack-docs about it.
libraryTarget
libraryTarget: "commonjs2"