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 // v-on handler values may contain multiple statements
asRawStatements = false asRawStatements = false
): ExpressionNode { ): ExpressionNode {
if (__DEV__ && __BROWSER__) { if (__BROWSER__) {
if (__DEV__) {
// simple in-browser validation (same logic in 2.x) // simple in-browser validation (same logic in 2.x)
validateBrowserExpression(node, context, asParams, asRawStatements) validateBrowserExpression(node, context, asParams, asRawStatements)
}
return node return node
} }