We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 810f6d1 commit 46ca7bcCopy full SHA for 46ca7bc
packages/compiler-sfc/src/parseComponent.ts
@@ -179,11 +179,11 @@ export function parseComponent(
179
let text = source.slice(currentBlock.start, currentBlock.end)
180
if (
181
options.deindent === true ||
182
- // by default, deindent unless it's script with default lang or ts
+ // by default, deindent unless it's script with default lang or (j/t)sx?
183
(options.deindent !== false &&
184
!(
185
currentBlock.type === 'script' &&
186
- (!currentBlock.lang || currentBlock.lang === 'ts')
+ (!currentBlock.lang || /^(j|t)sx?$/.test(currentBlock.lang))
187
))
188
) {
189
text = deindent(text)
0 commit comments