Open autra opened 7 years ago
Oups clicked on submit too soon. I'm editing the description.
So these plugins seems to run in some lifecycle steps of webpack not reached by this plugin. Is there any workaround or possibility to have them nonetheless?
Ok after digging a bit more: plugins are indeed run, but not on the file I think. Every individual js files are directly processed by babel, thus they don't go through webpack loaders. Only other files (in my case, glsl files for instance) are going through the webpack loading process, and then through plugins.
I'm actually not sure if this bug is still valid. It'd be nice if this plugin could load everything through webpack though.
Description
Some webpack plugin are not used at all when using this plugin. For instance,
definePlugin
anduglifyJsPlugin
don't seem to affect files.My use case: together, they can perform some dead code elimination on
if (DEBUG)
statement, allowing me to have a bundle without debug stuff. However, I'm also transpiling each file individually, and those still have theif (__DEBUG__)
statements in them.Reproducing steps
npm i && npm run transpile
grep "__DEBUG__" lib/ -r
Expected results
The last command yields no result
Actual results
The last command still shows some
__DEBUG__
instance in my transpiled code.