Skip to content

Commit

Permalink
fix: update babel filter
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <logan@mcan.sh>
  • Loading branch information
mcansh committed Dec 6, 2024
1 parent 0b0a3b0 commit b13da14
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ export default defineConfig({
svgSprite(),
reactRouter(),
babel({
filter: /\.[jt]sx?$/,
filter: /\.[jt]sx$/,
loader(path) {
if (/.ts$/i.test(path)) return "tsx";
if (/.tsx$/i.test(path)) return "tsx";
return "js";
return "jsx";
},
babelConfig: {
presets: ["@babel/preset-typescript"],
Expand Down

0 comments on commit b13da14

Please sign in to comment.