test(compiler-ssr): fix typo (#713)
This commit is contained in:
parent
e308ad99e9
commit
42db2fef9d
@ -30,18 +30,13 @@ describe('ssr: components', () => {
|
||||
}"
|
||||
`)
|
||||
|
||||
expect(compile(`<compoonent :is="foo" prop="b" />`).code)
|
||||
expect(compile(`<component :is="foo" prop="b" />`).code)
|
||||
.toMatchInlineSnapshot(`
|
||||
"const { resolveComponent: _resolveComponent } = require(\\"vue\\")
|
||||
"const { resolveDynamicComponent: _resolveDynamicComponent } = require(\\"vue\\")
|
||||
const { ssrRenderComponent: _ssrRenderComponent } = require(\\"@vue/server-renderer\\")
|
||||
|
||||
|
||||
return function ssrRender(_ctx, _push, _parent) {
|
||||
const _component_compoonent = _resolveComponent(\\"compoonent\\")
|
||||
|
||||
_push(_ssrRenderComponent(_component_compoonent, {
|
||||
is: _ctx.foo,
|
||||
prop: \\"b\\"
|
||||
}, null, _parent))
|
||||
_push(_ssrRenderComponent(_resolveDynamicComponent(_ctx.foo, _ctx.$), { prop: \\"b\\" }, null, _parent))
|
||||
}"
|
||||
`)
|
||||
})
|
||||
|
@ -36,7 +36,7 @@ export function compile(
|
||||
scopeId: options.mode === 'function' ? null : options.scopeId,
|
||||
// always prefix since compiler-ssr doesn't have size concern
|
||||
prefixIdentifiers: true,
|
||||
// disalbe optimizations that are unnecessary for ssr
|
||||
// disable optimizations that are unnecessary for ssr
|
||||
cacheHandlers: false,
|
||||
hoistStatic: false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user