rules_webpack
rules_webpack copied to clipboard
webpack.config.js.tmpl assumes commonjs
https://github.com/aspect-build/rules_webpack/blob/5e010a029d915b87167ea249eb88ffc22a43bca5/webpack/private/webpack.config.js.tmpl#L1
This line doesn't consider that the user may provide an ESM based config, which means this will error when running webpack from a project with type: "module" in package.json.
I've patched around this internally, but I'm still trying to think of how best to have the rules determine this without the user specifying.
Same for us, we had to patch webpack.config.js.tmpl
same we similarly we had to patch the config.js.tmpl