Skip to content

Commit 1cd0590

Browse files
authored
chore(plugin-vue): define renderFnName if necessary (#1357)
1 parent da57335 commit 1cd0590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugin-vue/src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ function genTemplateCode(
153153
options: ResolvedOptions,
154154
pluginContext: PluginContext
155155
) {
156-
const renderFnName = options.ssr ? 'ssrRender' : 'render'
157156
const template = descriptor.template!
158157

159158
// If the template is not using pre-processor AND is not using external src,
@@ -175,6 +174,7 @@ function genTemplateCode(
175174
const attrsQuery = attrsToQuery(template.attrs, 'js', true)
176175
const query = `?vue&type=template${srcQuery}${attrsQuery}`
177176
const request = JSON.stringify(src + query)
177+
const renderFnName = options.ssr ? 'ssrRender' : 'render'
178178
return {
179179
code: `import { ${renderFnName} as _sfc_${renderFnName} } from ${request}`,
180180
map: undefined

0 commit comments

Comments
 (0)