Use ModuleConcatenationPlugin generates code that raises exceptions

Do you want to request a feature or report a bug?
bug

What is the current behavior?
This issue is related to #5266 and describes a build configuration where the use of the ModuleConcatenationPlugin generates code that no longer executes successfully.
I’ve boiled down a production environment to a (hopefully) manageable repro case.

If the current behavior is a bug, please provide the steps to reproduce.

  1. extract the attached repro case
  2. run npm i
  3. run npm run build
  4. open index.html in browser
  5. The browser should now show an exception Uncaught ReferenceError: tinymce is not define
  6. Comment out the new webpack.optimize.ModuleConcatenationPlugin() in webpack.util.js
  7. run npm run build
  8. refresh index.html in browser
  9. The browser should now show the tinymce browser

webpack.zip

What is the expected behavior?
ModuleConcatenationPlugin not to cause any alterations of the code that make it fail

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
node: 8.1.4
npm: 4.6.1
os: windows 7

Author: Fantashit

1 thought on “Use ModuleConcatenationPlugin generates code that raises exceptions

Comments are closed.