wip(ssr): element scopeId
This commit is contained in:
@@ -31,6 +31,7 @@ export function compile(
|
||||
// apply DOM-specific parsing options
|
||||
...parserOptions,
|
||||
ssr: true,
|
||||
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
|
||||
|
||||
@@ -246,6 +246,10 @@ export const ssrTransformElement: NodeTransform = (node, context) => {
|
||||
removeStaticBinding(openTag, 'class')
|
||||
}
|
||||
|
||||
if (context.scopeId) {
|
||||
openTag.push(` ${context.scopeId}`)
|
||||
}
|
||||
|
||||
openTag.push(`>`)
|
||||
if (rawChildren) {
|
||||
openTag.push(rawChildren)
|
||||
|
||||
Reference in New Issue
Block a user