File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ async function genTemplateCode(
268268 // If the template is not using pre-processor AND is not using external src,
269269 // compile and inline it directly in the main module. When served in vite this
270270 // saves an extra request per SFC which can improve load performance.
271- if ( ! template . lang && ! template . src ) {
271+ if ( ( ! template . lang || template . lang === 'html' ) && ! template . src ) {
272272 return transformTemplateInMain (
273273 template . content ,
274274 descriptor ,
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ export function canInlineMain(
113113 return false
114114 }
115115 const lang = descriptor . script ?. lang || descriptor . scriptSetup ?. lang
116- if ( ! lang ) {
116+ if ( ! lang || lang === 'js' ) {
117117 return true
118118 }
119119 if (
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export function resolveTemplateCompilerOptions(
175175 ssr,
176176 ssrCssVars : cssVars ,
177177 transformAssetUrls,
178- preprocessLang : block . lang ,
178+ preprocessLang : block . lang === 'html' ? undefined : block . lang ,
179179 preprocessOptions,
180180 compilerOptions : {
181181 ...options . template ?. compilerOptions ,
You can’t perform that action at this time.
0 commit comments