We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 963085d commit 5df7dfcCopy full SHA for 5df7dfc
packages/compiler-sfc/src/compileScript.ts
@@ -166,7 +166,10 @@ export function compileScript(
166
scriptLang === 'tsx' ||
167
scriptSetupLang === 'ts' ||
168
scriptSetupLang === 'tsx'
169
- const plugins: ParserPlugin[] = [...babelParserDefaultPlugins, 'jsx']
+ const plugins: ParserPlugin[] = [...babelParserDefaultPlugins]
170
+ if (!isTS || scriptLang === 'tsx' || scriptSetupLang === 'tsx') {
171
+ plugins.push('jsx')
172
+ }
173
if (options.babelParserPlugins) plugins.push(...options.babelParserPlugins)
174
if (isTS) plugins.push('typescript', 'decorators-legacy')
175
0 commit comments