File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,9 @@ export function resolveTemplateCompilerOptions(
186
186
return {
187
187
...options . template ,
188
188
id,
189
- ast : descriptor . template ?. ast ,
189
+ ast : canReuseAST ( options . compiler . version )
190
+ ? descriptor . template ?. ast
191
+ : undefined ,
190
192
filename,
191
193
scoped : hasScoped ,
192
194
slotted : descriptor . slotted ,
@@ -206,3 +208,17 @@ export function resolveTemplateCompilerOptions(
206
208
} ,
207
209
}
208
210
}
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