webpack-contrib / closure-webpack-plugin

Webpack Google Closure Compiler and Closure Library plugin -
https://developers.google.com/closure/
MIT License
434 stars 60 forks source link

fix: webpack split chunks incompatibility using IIFE #188

Open Abdillah opened 2 years ago

Abdillah commented 2 years ago

Remove IIFE wrapper on standard build since it prevent multiple Webpack entries and/or chunks for working correctly.

This is also one way to ask for confirmation on what is the purpose of IIFE in standard build? This comment is another way.

linux-foundation-easycla[bot] commented 2 years ago

CLA Signed

The committers are authorized under a signed CLA.

ChadKillingsworth commented 2 years ago

Without the IIFE you pollute the global namespace. You can also end up with conflicts with other libraries.

Abdillah commented 2 years ago

Thank you for the response.

If the IIFE is set and it interfere with the chunks feature, then is it considered as bug?

ChadKillingsworth commented 2 years ago

Yes that would be would be a bug. The harder question is determining exactly why it is occurring. It most likely means that the dependency graph is wrong.