File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,9 @@ export function resolveTemplateCompilerOptions(
186186 return {
187187 ...options . template ,
188188 id,
189- ast : descriptor . template ?. ast ,
189+ ast : canReuseAST ( options . compiler . version )
190+ ? descriptor . template ?. ast
191+ : undefined ,
190192 filename,
191193 scoped : hasScoped ,
192194 slotted : descriptor . slotted ,
@@ -206,3 +208,17 @@ export function resolveTemplateCompilerOptions(
206208 } ,
207209 }
208210}
211+
212+ /**
213+ * Versions before 3.4.3 have issues when the user has passed additional
214+ * tempalte parse options e.g. `isCustomElement`.
215+ */
216+ function canReuseAST ( version : string | undefined ) {
217+ if ( version ) {
218+ const [ _ , minor , patch ] = version . split ( '.' ) . map ( Number )
219+ if ( minor >= 4 && patch >= 3 ) {
220+ return true
221+ }
222+ }
223+ return false
224+ }
You can’t perform that action at this time.
0 commit comments