refactor(compiler): provide _ctx and _cache via arguments

This commit is contained in:
Evan You
2020-02-10 17:29:12 -05:00
parent ade07c64a1
commit 47e984d31f
21 changed files with 129 additions and 188 deletions

View File

@@ -19,7 +19,7 @@ describe('scopeId compiler support', () => {
})
expect(ast.helpers).toContain(WITH_SCOPE_ID)
expect(code).toMatch(`const _withId = _withScopeId("test")`)
expect(code).toMatch(`export const render = _withId(function render() {`)
expect(code).toMatch(`export const render = _withId(function render(`)
expect(code).toMatchSnapshot()
})
@@ -68,7 +68,7 @@ describe('scopeId compiler support', () => {
test('should push scopeId for hoisted nodes', () => {
const { ast, code } = baseCompile(
`<div><div>hello</div><div>world</div></div>`,
`<div><div>hello</div>{{ foo }}<div>world</div></div>`,
{
mode: 'module',
scopeId: 'test',