You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tells webpack which algorithm to use when choosing chunk ids. Setting `optimization.chunkIds` to `false` tells webpack that none of built-in algorithms should be used, as custom one can be provided via plugin. There are a couple of defaults for `optimization.chunkIds`:
46
+
-`false`: disable webpack's built-in chunk id algorithm
47
+
- one of the following values:
48
+
-`'natural'`
49
+
-`'named'`
50
+
-`'size'`
51
+
-`'total-size'`
52
+
-`'deterministic'`
53
+
54
+
Tells Webpack which algorithm to use for chunk IDs. Setting `optimization.chunkIds` to `false` tells webpack that none of built-in algorithms should be used, as custom one can be provided via plugin. There are a couple of defaults for `optimization.chunkIds`:
47
55
48
56
The default value of `optimization.chunkIds` depends on the [`mode`](/configuration/mode/):
49
57
@@ -135,6 +143,8 @@ W> If you are using webpack [CLI](/api/cli/), the webpack process will not exit
135
143
136
144
<Badgetext="5.95.0+" />
137
145
146
+
T> IIFE (Immediately Invoked Function Expression) is a function that runs immediately after it is created. Webpack uses it to wrap code and avoid variable conflicts.
147
+
138
148
Use `optimization.avoidEntryIife` to avoid wrapping the entry module in an IIFE when it is required (search for `"This entry needs to be wrapped in an IIFE because"` in [JavascriptModulesPlugin](https://github.com/webpack/webpack/blob/main/lib/javascript/JavascriptModulesPlugin.js)). This approach helps optimize performance for JavaScript engines and enables tree shaking when building ESM libraries.
139
149
140
150
Currently, `optimization.avoidEntryIife` can only optimize a single entry module along with other modules.
0 commit comments