Skip to content

Commit

Permalink
fix(compiler-core): fix unintended imports in esm-bundler builds
Browse files Browse the repository at this point in the history
fix #2258, fix #2515
  • Loading branch information
yyx990803 committed Nov 27, 2020
1 parent 46d80f4 commit 55d99d7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/compiler-core/src/transforms/transformExpression.ts
Expand Up @@ -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
}

Expand Down

0 comments on commit 55d99d7

Please sign in to comment.