Skip to content

Commit 5c02838

Browse files
committed
udpate
1 parent 2ca5e8d commit 5c02838

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/configuration/optimization.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,28 +124,28 @@ module.exports = {
124124

125125
W> If you are using webpack [CLI](/api/cli/), the webpack process will not exit with an error code while this plugin is enabled. If you want webpack to "fail" when using the CLI, please check out the [`bail` option](/api/cli/#advanced-options).
126126

127-
## optimization.entryIife
127+
## optimization.avoidEntryIife
128128

129129
`boolean = false`
130130

131-
Use `optimization.entryIife` to avoid wrapping the entry module in an IIFE when it is required (search for `"This entry need 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.
131+
Use `optimization.avoidEntryIife` to avoid wrapping the entry module in an IIFE when it is required (search for `"This entry need 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.
132132

133-
Currently, `optimization.entryIife` can only optimize a single entry module along with other modules.
133+
Currently, `optimization.avoidEntryIife` can only optimize a single entry module along with other modules.
134134

135-
By default `optimization.entryIife` is enabled in `production` [mode](/configuration/mode/) and disabled elsewise.
135+
By default `optimization.avoidEntryIife` is enabled in `production` [mode](/configuration/mode/) and disabled elsewise.
136136

137137
**webpack.config.js**
138138

139139
```js
140140
module.exports = {
141141
//...
142142
optimization: {
143-
entryIife: true,
143+
avoidEntryIife: true,
144144
},
145145
};
146146
```
147147

148-
W> The `⁠optimization.entryIife` option can negatively affect build performance, if you prioritize build performance over these optimizations, consider disabling this option.
148+
W> The `⁠optimization.avoidEntryIife` option can negatively affect build performance, if you prioritize build performance over these optimizations, consider disabling this option.
149149

150150
## optimization.flagIncludedChunks
151151

0 commit comments

Comments
 (0)