rules_webpack icon indicating copy to clipboard operation
rules_webpack copied to clipboard

webpack.config.js.tmpl assumes commonjs

Open Aghassi opened this issue 2 years ago • 2 comments

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.

Aghassi avatar Feb 06 '24 23:02 Aghassi

Same for us, we had to patch webpack.config.js.tmpl

stoiky avatar Feb 27 '24 13:02 stoiky

same we similarly we had to patch the config.js.tmpl

jbruce1-ocrolus avatar Mar 24 '24 17:03 jbruce1-ocrolus