From: Evan You Date: Thu, 6 Feb 2020 20:10:21 +0000 (-0500) Subject: build: reduce compiler minified size X-Git-Tag: v3.0.0-alpha.5~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cfbab0686acdaf46ec308d765758815fa21a112;p=thirdparty%2Fvuejs%2Fcore.git build: reduce compiler minified size --- diff --git a/rollup.config.js b/rollup.config.js index 2c34243eda..0934ba8bd6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -181,7 +181,9 @@ function createReplacePlugin( ...(isProduction && isBrowserBuild ? { 'context.onError(': `/*#__PURE__*/ context.onError(`, - 'emitError(': `/*#__PURE__*/ emitError(` + 'emitError(': `/*#__PURE__*/ emitError(`, + 'createCompilerError(': `/*#__PURE__*/ createCompilerError(`, + 'createDOMCompilerError(': `/*#__PURE__*/ createDOMCompilerError(` } : {}) } @@ -212,7 +214,11 @@ function createMinifiedConfig(format) { }, [ terser({ - module: /^esm/.test(format) + module: /^esm/.test(format), + compress: { + ecma: 2015, + pure_getters: true + } }) ] )