7

upgraded to webpack 3 and using the ModuleConcatenationPlugin plugin (followed instructions webpack 3: Official Release!!). i'm not seeing any difference in a diff of my bundle with the plugin added vs without and still seeing all the function closures.

added the --display-optimization-bailout flag to for output on why hoisting was prevented, but i don't see any output.

looked around the webpack source a bit and it appears that bailout reasons are not being set because module.meta.harmonyModule is falsy, not sure why... https://github.com/webpack/webpack/blob/master/lib/optimize/ModuleConcatenationPlugin.js#L42

anyone else have a simliar issue?

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
unclechett
  • 71
  • 2
  • I'm having a similar issue but have found no solution or reason yet. very interested in an answer to this. – StefanHayden Jun 21 '17 at 17:15
  • Are you suggesting this is a bug in the code? If so, it isn't a question that can be answered here. – miken32 Jun 22 '17 at 05:07
  • I think there are common thing that can be added to the config that make this not work but webpack does not report what is happening. – StefanHayden Jun 22 '17 at 12:36
  • In our case we found the babelrc was overriding some settings we trying to only set for the final build of the app. it was causing the modules to always output in commonjs instead of es6 harmony modules. – StefanHayden Jun 23 '17 at 12:57
  • 1
    @StefanHayden What was your .babelrc? – Tony Jun 27 '17 at 11:15

0 Answers0