Skip to content

Commit c9eb3b0

Browse files
authored
fix: Allow vite 6.0.9+ (#1497)
1 parent 665f5a5 commit c9eb3b0

File tree

5 files changed

+56
-53
lines changed

5 files changed

+56
-53
lines changed

packages/wxt/e2e/tests/npm-packages.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ test('Only one version of esbuild should be installed (each version is ~20mb of
2121
if (name === 'esbuild') esbuildVersions.add(meta.version);
2222
});
2323

24-
// TODO: Revert to 1 once vite is upgraded to >6.0.8
25-
expect([...esbuildVersions]).toHaveLength(2);
24+
expect([...esbuildVersions]).toHaveLength(1);
2625
});
2726

2827
function iterateDependencies(

packages/wxt/src/core/builders/vite/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export async function createViteBuilder(
6767
ignored: [`${wxtConfig.outBaseDir}/**`, `${wxtConfig.wxtDir}/**`],
6868
};
6969

70+
// TODO: Remove once https://github.com/wxt-dev/wxt/pull/1411 is merged
71+
config.legacy ??= {};
72+
// @ts-ignore: Untyped option:
73+
config.legacy.skipWebSocketTokenCheck = true;
74+
7075
const server = getWxtDevServer?.();
7176

7277
config.plugins ??= [];

packages/wxt/src/core/builders/vite/plugins/bundleAnalysis.ts

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import path from 'node:path';
66
let increment = 0;
77

88
export function bundleAnalysis(config: ResolvedConfig): vite.Plugin {
9-
// @ts-expect-error: Mismatched vite version
109
return visualizer({
1110
template: 'raw-data',
1211
filename: path.resolve(

pnpm-lock.yaml

+49-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ catalog:
8888
unbuild: ^3.5.0
8989
unimport: ^3.13.1
9090
unocss: ^0.64.0 || ^0.65.0 || ^65.0.0 ||^66.0.0
91-
vite: ^5.0.0 || <=6.0.8
91+
vite: ^5.0.0 || ^6.0.0
9292
vite-node: ^2.1.4 || ^3.0.0
9393
vite-plugin-solid: ^2.11.6
9494
vitepress: ^1.6.3

0 commit comments

Comments
 (0)