closure-webpack-plugin icon indicating copy to clipboard operation
closure-webpack-plugin copied to clipboard

fix: webpack split chunks incompatibility using IIFE

Open Abdillah opened this issue 4 years ago • 4 comments

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.

Abdillah avatar Nov 15 '21 02:11 Abdillah

CLA Signed

The committers are authorized under a signed CLA.

  • :white_check_mark: Hernawan Faïz Abdillah (00327b09c3d522ab1c0df6f80c4dfb21827c2403)

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

ChadKillingsworth avatar Feb 13 '22 18:02 ChadKillingsworth

Thank you for the response.

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

Abdillah avatar Feb 14 '22 04:02 Abdillah

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.

ChadKillingsworth avatar Feb 14 '22 13:02 ChadKillingsworth