Skip to content

Commit

Permalink
fix: support jsx script blocks within sfc (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 13, 2021
1 parent aea4d93 commit 68bbcc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 68bbcc9

Please sign in to comment.