Skip to content

Commit 9cfbab0

Browse files
committed
build: reduce compiler minified size
1 parent 85a2a41 commit 9cfbab0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

rollup.config.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ function createReplacePlugin(
181181
...(isProduction && isBrowserBuild
182182
? {
183183
'context.onError(': `/*#__PURE__*/ context.onError(`,
184-
'emitError(': `/*#__PURE__*/ emitError(`
184+
'emitError(': `/*#__PURE__*/ emitError(`,
185+
'createCompilerError(': `/*#__PURE__*/ createCompilerError(`,
186+
'createDOMCompilerError(': `/*#__PURE__*/ createDOMCompilerError(`
185187
}
186188
: {})
187189
}
@@ -212,7 +214,11 @@ function createMinifiedConfig(format) {
212214
},
213215
[
214216
terser({
215-
module: /^esm/.test(format)
217+
module: /^esm/.test(format),
218+
compress: {
219+
ecma: 2015,
220+
pure_getters: true
221+
}
216222
})
217223
]
218224
)

0 commit comments

Comments
 (0)