import { baseCompile , baseParse , CompilerOptions , CodegenResult , ParserOptions , RootNode , noopDirectiveTransform , NodeTransform , DirectiveTransform } from '@vue/compiler-core' ; import { parserOptions } from './parserOptions' ; import { transformStyle } from './transforms/transformStyle' ; import { transformVHtml } from './transforms/vHtml' ; import { transformVText } from './transforms/vText' ; import { transformModel } from './transforms/vModel' ; import { transformOn } from './transforms/vOn' ; import { transformShow } from './transforms/vShow' ; import { warnTransitionChildren } from './transforms/warnTransitionChildren' ; import { stringifyStatic } from './transforms/stringifyStatic' ; import { ignoreSideEffectTags } from './transforms/ignoreSideEffectTags' ; import { extend } from '@vue/shared' ; export { parserOptions } ; export const DOMNodeTransforms = [ transformStyle , ... ( __DEV__ ? [ warnTransitionChildren ] : [ ] ) ] ; export const DOMDirectiveTransforms = { cloak : noopDirectiveTransform , html : transformVHtml , text : transformVText , model : transformModel , on : transformOn , show : transformShow } ; export function compile ( template , options = { } ) { return baseCompile ( template , extend ( { } , parserOptions , options , { nodeTransforms : [ ignoreSideEffectTags , ... DOMNodeTransforms , ... ( options . nodeTransforms || [ ] ) ] , directiveTransforms : extend ( { } , DOMDirectiveTransforms , options . directiveTransforms || { } ) , transformHoist : __BROWSER__ ? null : stringifyStatic } ) ) ; } export function parse ( template , options = { } ) { return baseParse ( template , extend ( { } , parserOptions , options ) ) ; } export * from './runtimeHelpers' ; export { transformStyle } from './transforms/transformStyle' ; export { createDOMCompilerError , DOMErrorCodes } from './errors' ; export * from '@vue/compiler-core' ;