mirror of https://github.com/vuejs/core.git
fix(compiler-dom): do not throw in production on side effect tags
close #8287 close #8292
This commit is contained in:
parent
ab9256a4bb
commit
c454b9d7f4
|
@ -7,9 +7,13 @@ export const ignoreSideEffectTags: NodeTransform = (node, context) => {
|
||||||
node.tagType === ElementTypes.ELEMENT &&
|
node.tagType === ElementTypes.ELEMENT &&
|
||||||
(node.tag === 'script' || node.tag === 'style')
|
(node.tag === 'script' || node.tag === 'style')
|
||||||
) {
|
) {
|
||||||
context.onError(
|
__DEV__ &&
|
||||||
createDOMCompilerError(DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG, node.loc)
|
context.onError(
|
||||||
)
|
createDOMCompilerError(
|
||||||
|
DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG,
|
||||||
|
node.loc
|
||||||
|
)
|
||||||
|
)
|
||||||
context.removeNode()
|
context.removeNode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue