From ec3f3292c260e464f5d1d456ee878d3afaa98661 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 13 Mar 2021 14:38:53 +0000 Subject: [PATCH] fix: support jsx script blocks within sfc (#53) --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index eb4ffba..64702ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -130,7 +130,7 @@ export function createVuePlugin(rawOptions: VueViteOptions = {}): Plugin { async transform(code, id) { const { filename, query } = parseVueRequest(id) - if (/\.(tsx|jsx)$/.test(id)) { + if (!query.vue && /\.(tsx|jsx)$/.test(id)) { return transformVueJsx(code, id, options.jsxOptions) }