fix(compiler-core): fix unintended imports in esm-bundler builds

fix #2258, fix #2515
This commit is contained in:
Evan You 2020-11-27 11:04:15 -05:00
parent 46d80f4d58
commit 55d99d729e

View File

@ -98,9 +98,11 @@ export function processExpression(
// v-on handler values may contain multiple statements
asRawStatements = false
): ExpressionNode {
if (__DEV__ && __BROWSER__) {
// simple in-browser validation (same logic in 2.x)
validateBrowserExpression(node, context, asParams, asRawStatements)
if (__BROWSER__) {
if (__DEV__) {
// simple in-browser validation (same logic in 2.x)
validateBrowserExpression(node, context, asParams, asRawStatements)
}
return node
}