Skip to content

Commit fd470e0

Browse files
committed
build: drop compiler error emit code in browser production build
1 parent 8f6b669 commit fd470e0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rollup.config.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,13 @@ function createReplacePlugin(
177177
// support options?
178178
// the lean build drops options related code with buildOptions.lean: true
179179
__FEATURE_OPTIONS__: !packageOptions.lean && !process.env.LEAN,
180-
__FEATURE_SUSPENSE__: true
180+
__FEATURE_SUSPENSE__: true,
181+
...(isProduction && isBrowserBuild
182+
? {
183+
'context.onError(': `/*#__PURE__*/ context.onError(`,
184+
'emitError(': `/*#__PURE__*/ emitError(`
185+
}
186+
: {})
181187
}
182188
// allow inline overrides like
183189
//__RUNTIME_COMPILE__=true yarn build runtime-core

0 commit comments

Comments
 (0)