Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
fix: pass transform with jsx is truly
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Oct 29, 2020
1 parent 65cc1fe commit 97c0916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -28,7 +28,7 @@ export function createVuePlugin(options: VueViteOptions = {}) {

return {
resolvers: [resolver],
transforms: [jsxTransform],
transforms: jsx ? [jsxTransform] : [],
// if set truly `jsx` option, should disabled esbuild
enableEsbuild: !jsx,
configureServer: vuePlugin,
Expand Down
2 changes: 1 addition & 1 deletion src/jsxTransform.ts
Expand Up @@ -3,7 +3,7 @@ import { transform } from '@babel/core'

export const jsxTransform: Transform = {
test({ path }) {
return /\.(tsx?|jsx?)$/.test(path)
return /\.(tsx?|jsx)$/.test(path)
},
transform({ id, code }) {
const result = transform(code, {
Expand Down

0 comments on commit 97c0916

Please sign in to comment.