build: drop compiler error emit code in browser production build

This commit is contained in:
Evan You 2020-02-05 14:21:09 -05:00
parent 8f6b6690a2
commit fd470e0b1a

View File

@ -177,7 +177,13 @@ function createReplacePlugin(
// support options? // support options?
// the lean build drops options related code with buildOptions.lean: true // the lean build drops options related code with buildOptions.lean: true
__FEATURE_OPTIONS__: !packageOptions.lean && !process.env.LEAN, __FEATURE_OPTIONS__: !packageOptions.lean && !process.env.LEAN,
__FEATURE_SUSPENSE__: true __FEATURE_SUSPENSE__: true,
...(isProduction && isBrowserBuild
? {
'context.onError(': `/*#__PURE__*/ context.onError(`,
'emitError(': `/*#__PURE__*/ emitError(`
}
: {})
} }
// allow inline overrides like // allow inline overrides like
//__RUNTIME_COMPILE__=true yarn build runtime-core //__RUNTIME_COMPILE__=true yarn build runtime-core