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.tag === 'script' || node.tag === 'style')
|
||||
) {
|
||||
context.onError(
|
||||
createDOMCompilerError(DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG, node.loc)
|
||||
)
|
||||
__DEV__ &&
|
||||
context.onError(
|
||||
createDOMCompilerError(
|
||||
DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG,
|
||||
node.loc
|
||||
)
|
||||
)
|
||||
context.removeNode()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue