MCPcopy
hub / github.com/vuejs/core / transformWithOnce

Function transformWithOnce

packages/compiler-core/__tests__/transforms/vOnce.spec.ts:11–20  ·  view source on GitHub ↗
(template: string, options: CompilerOptions = {})

Source from the content-addressed store, hash-verified

9import { RENDER_SLOT, SET_BLOCK_TRACKING } from '../../src/runtimeHelpers'
10
11function transformWithOnce(template: string, options: CompilerOptions = {}) {
12 const ast = parse(template)
13 const [nodeTransforms, directiveTransforms] = getBaseTransformPreset()
14 transform(ast, {
15 nodeTransforms,
16 directiveTransforms,
17 ...options,
18 })
19 return ast
20}
21
22describe('compiler: v-once transform', () => {
23 test('as root node', () => {

Callers 1

vOnce.spec.tsFile · 0.85

Calls 3

getBaseTransformPresetFunction · 0.90
transformFunction · 0.90
parseFunction · 0.50

Tested by

no test coverage detected