Skip to content

Commit

Permalink
fix: enable tryCatchDeoptimization
Browse files Browse the repository at this point in the history
to prevent RegExp validation from being treeshaken
  • Loading branch information
Loïc Mangeonjean committed Jul 12, 2024
1 parent a7d978b commit 537c0fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rollup/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ export default (args: Record<string, string>): rollup.RollupOptions[] => {
treeshake: {
annotations: true,
preset: 'smallest',
moduleSideEffects: true
moduleSideEffects: true,
tryCatchDeoptimization: true
},
external,
output: [{
Expand Down Expand Up @@ -598,6 +599,7 @@ export default (args: Record<string, string>): rollup.RollupOptions[] => {
annotations: true,
preset: 'smallest',
propertyReadSideEffects: false,
tryCatchDeoptimization: true,
moduleSideEffects (id) {
return id.startsWith(DIST_DIR) || id.endsWith('.css')
}
Expand Down

0 comments on commit 537c0fe

Please sign in to comment.