Skip to content

Commit f65215f

Browse files
authored
feat: add optimization.avoidEntryIife (#33)
1 parent fc71136 commit f65215f

File tree

5 files changed

+83
-66
lines changed

5 files changed

+83
-66
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"javascript-stringify": "^2.0.1"
3232
},
3333
"devDependencies": {
34-
"@rspack/core": "^1.1.8",
34+
"@rspack/core": "^1.2.0-alpha.0",
3535
"jest": "^27.0.0",
3636
"prettier": "^2.0.5",
3737
"typescript": "^5.0.0",

pnpm-lock.yaml

Lines changed: 79 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Optimization.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module.exports = class extends ChainedMap {
2727
'mangleExports',
2828
'innerGraph',
2929
'realContentHash',
30+
'avoidEntryIife',
3031
]);
3132
}
3233

types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ declare namespace Config {
470470
mangleExports(value: RspackOptimization['mangleExports']): this;
471471
innerGraph(value: RspackOptimization['innerGraph']): this;
472472
realContentHash(value: RspackOptimization['realContentHash']): this;
473+
avoidEntryIife(value: RspackOptimization['avoidEntryIife']): this;
473474
}
474475

475476
interface RuntimeChunk {

types/test/rspack-chain-tests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ config
245245
.runtimeChunk({ name: ({}) => 'hello' })
246246
.sideEffects(true)
247247
.usedExports(true)
248+
.avoidEntryIife(true)
248249
.splitChunks(false)
249250
.splitChunks.set('chunks', 'all')
250251
.set('chunks', 'all')

0 commit comments

Comments
 (0)