]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
build: reduce compiler minified size
authorEvan You <yyx990803@gmail.com>
Thu, 6 Feb 2020 20:10:21 +0000 (15:10 -0500)
committerEvan You <yyx990803@gmail.com>
Thu, 6 Feb 2020 22:45:46 +0000 (17:45 -0500)
rollup.config.js

index 2c34243edaf67fb4a5fe46a8ef2abe1d39ef88ec..0934ba8bd6e7e58585b16bc3db451cfd46ff209d 100644 (file)
@@ -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
+        }
       })
     ]
   )