feat(compiler-dom): v-cloak transform (#141)
This commit is contained in:
@@ -2,6 +2,7 @@ import { baseCompile, CompilerOptions, CodegenResult } from '@vue/compiler-core'
|
||||
import { parserOptionsMinimal } from './parserOptionsMinimal'
|
||||
import { parserOptionsStandard } from './parserOptionsStandard'
|
||||
import { transformStyle } from './transforms/transformStyle'
|
||||
import { transformCloak } from './transforms/vCloak'
|
||||
import { transformVHtml } from './transforms/vHtml'
|
||||
|
||||
export function compile(
|
||||
@@ -13,6 +14,7 @@ export function compile(
|
||||
...(__BROWSER__ ? parserOptionsMinimal : parserOptionsStandard),
|
||||
nodeTransforms: [transformStyle, ...(options.nodeTransforms || [])],
|
||||
directiveTransforms: {
|
||||
cloak: transformCloak,
|
||||
html: transformVHtml,
|
||||
...(options.directiveTransforms || {})
|
||||
}
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
// TODO
|
||||
import { DirectiveTransform } from 'packages/compiler-core/src/transform'
|
||||
|
||||
export const transformCloak: DirectiveTransform = (node, context) => {
|
||||
return { props: [], needRuntime: false }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user