const scriptLang = script && script.lang
const scriptSetupLang = scriptSetup && scriptSetup.lang
const vapor = sfc.vapor || options.vapor
+ const ssr = options.templateOptions?.ssr
if (!scriptSetup) {
if (!script) {
if (
sfc.cssVars.length &&
// no need to do this when targeting SSR
- !options.templateOptions?.ssr
+ !ssr
) {
ctx.helperImports.add(CSS_VARS_HELPER)
ctx.helperImports.add('unref')
} else {
// inline mode
if (sfc.template && !sfc.template.src) {
- if (options.templateOptions && options.templateOptions.ssr) {
+ if (ssr) {
hasInlinedSsrRenderFn = true
}
// inline render function mode - we are going to compile the template and
ctx.s.appendRight(
endOffset,
// vapor mode generates its own return when inlined
- `\n${vapor ? `` : `return `}${returned}\n}\n\n`,
+ `\n${vapor && !ssr ? `` : `return `}${returned}\n}\n\n`,
)
}