Skip to content

Commit

Permalink
feat: add optimization.avoidEntryIife (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinaaa authored Jan 3, 2025
1 parent fc71136 commit f65215f
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 66 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"javascript-stringify": "^2.0.1"
},
"devDependencies": {
"@rspack/core": "^1.1.8",
"@rspack/core": "^1.2.0-alpha.0",
"jest": "^27.0.0",
"prettier": "^2.0.5",
"typescript": "^5.0.0",
Expand Down
144 changes: 79 additions & 65 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Optimization.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = class extends ChainedMap {
'mangleExports',
'innerGraph',
'realContentHash',
'avoidEntryIife',
]);
}

Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ declare namespace Config {
mangleExports(value: RspackOptimization['mangleExports']): this;
innerGraph(value: RspackOptimization['innerGraph']): this;
realContentHash(value: RspackOptimization['realContentHash']): this;
avoidEntryIife(value: RspackOptimization['avoidEntryIife']): this;
}

interface RuntimeChunk {
Expand Down
1 change: 1 addition & 0 deletions types/test/rspack-chain-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ config
.runtimeChunk({ name: ({}) => 'hello' })
.sideEffects(true)
.usedExports(true)
.avoidEntryIife(true)
.splitChunks(false)
.splitChunks.set('chunks', 'all')
.set('chunks', 'all')
Expand Down

0 comments on commit f65215f

Please sign in to comment.