We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1693924 commit 7d7a241Copy full SHA for 7d7a241
packages/compiler-sfc/src/compileScript.ts
@@ -172,6 +172,12 @@ export function compileScript(
172
const plugins: ParserPlugin[] = []
173
if (!isTS || scriptLang === 'tsx' || scriptSetupLang === 'tsx') {
174
plugins.push('jsx')
175
+ } else {
176
+ // If don't match the case of adding jsx, should remove the jsx from the babelParserPlugins
177
+ if (options.babelParserPlugins)
178
+ options.babelParserPlugins = options.babelParserPlugins.filter(
179
+ n => n !== 'jsx'
180
+ )
181
}
182
if (options.babelParserPlugins) plugins.push(...options.babelParserPlugins)
183
if (isTS) plugins.push('typescript', 'decorators-legacy')
0 commit comments