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

Function compile

packages/compiler-sfc/__tests__/compileScript/hoistStatic.spec.ts:6–12  ·  view source on GitHub ↗
(src: string, options?: Partial<SFCScriptCompileOptions>)

Source from the content-addressed store, hash-verified

4
5describe('sfc hoist static', () => {
6 function compile(src: string, options?: Partial<SFCScriptCompileOptions>) {
7 return compileSFCScript(src, {
8 inlineTemplate: true,
9 hoistStatic: true,
10 ...options,
11 })
12 }
13
14 test('should hoist literal value', () => {
15 const code = `

Calls 1

compileSFCScriptFunction · 0.90

Tested by

no test coverage detected