Skip to content

Commit f67b7e2

Browse files
authored
Update Vite 8 plugin configuration (#103)
1 parent e91b1c0 commit f67b7e2

7 files changed

Lines changed: 13 additions & 18 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update the Babel Vite plugin configuration for Vite 8 dependency optimization and apply the React Compiler transform to TypeScript modules outside dependencies. @sneridagh

apps/aurora/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"rollup-plugin-visualizer": "^7.0.1",
6767
"typescript": "catalog:",
6868
"vite": "catalog:",
69-
"vite-plugin-babel": "^1.3.2",
69+
"vite-plugin-babel": "1.7.3",
7070
"vite-plugin-devtools-json": "^1.0.0",
7171
"vitest": "catalog:"
7272
},

apps/aurora/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export default defineConfig(({ command, mode, isSsrBuild }) => {
2121
tailwindcss(),
2222
reactRouter(),
2323
babel({
24-
filter: /app\/.*\.tsx?$/,
24+
include: /\.tsx?$/,
25+
exclude: /node_modules/,
2526
babelConfig: {
2627
presets: ['@babel/preset-typescript'],
2728
plugins: ['babel-plugin-react-compiler'],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Switch the registry Vite plugin from the deprecated esbuild top-level await setting to Vite 8's oxc configuration. @sneridagh

packages/registry/vite-plugin.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ export function PloneRegistryVitePlugin(): {
99
exclude: string[];
1010
};
1111
};
12-
esbuild: {
13-
supported: {
14-
'top-level-await': boolean;
15-
};
16-
};
12+
oxc: Record<string, never>;
1713
optimizeDeps: {
1814
exclude: string[];
1915
};

packages/registry/vite-plugin.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,7 @@ export const PloneRegistryVitePlugin = () => {
171171
exclude: addOns,
172172
},
173173
},
174-
esbuild: {
175-
supported: {
176-
'top-level-await': true, //browsers can handle top-level-await features
177-
},
178-
},
174+
oxc: {},
179175
optimizeDeps: {
180176
exclude: addOns,
181177
},

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)