Skip to content

Conversation

edison1105
Copy link
Member

@edison1105 edison1105 commented Apr 12, 2023

related to vuejs/core#6979
without <script setup>
before: see
image

after:
image

@@ -276,6 +277,7 @@ async function doCompileTemplate(
isTS: boolean
) {
const templateResult = store.compiler.compileTemplate({
isProd: false,
...store.options?.template,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idProd may be defined in store.options?.template

// script ssr needs to be performed if :
// 1.using <script setup> where the render fn is inlined.
// 2.using cssVars, as it do not need to be injected during SSR.
if (descriptor.scriptSetup || descriptor.cssVars.length > 0) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If cssVars is used,clientScript is not the same as ssrScript because we do not inject useCssVars into ssr.

@yyx990803 yyx990803 merged commit 7e2bcc8 into vuejs:main Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants