Skip to content

Commit

Permalink
Build: Attempt to fix Vite 6 sandboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Nov 27, 2024
1 parent 3a0f922 commit c424e16
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions scripts/utils/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const installYarn2 = async ({ cwd, dryRun, debug }: YarnOptions) => {
export const addWorkaroundResolutions = async ({
cwd,
dryRun,
key,
}: YarnOptions & { key?: TemplateKey }) => {
logger.info(`🔢 Adding resolutions for workarounds`);

Expand All @@ -82,22 +81,11 @@ export const addWorkaroundResolutions = async ({
const packageJson = await readJSON(packageJsonPath);
packageJson.resolutions = {
...packageJson.resolutions,
// Due to our support of older vite versions
'@vitejs/plugin-react': '4.2.0',
'@vitejs/plugin-vue': '4.5.0',
// TODO: Remove this once we figure out how to properly test Vite 4, 5 and 6 in our sandboxes
vite: '^5.0.0',
// We need to downgrade the plugin so that it works with Vite 5 projects
'@sveltejs/vite-plugin-svelte': '4.0.2',
'@testing-library/dom': '^9.3.4',
'@testing-library/jest-dom': '^6.5.0',
'@testing-library/user-event': '^14.5.2',
};

if (key.includes('svelte-kit')) {
packageJson.resolutions['@sveltejs/vite-plugin-svelte'] = '^3.0.0';
}

await writeJSON(packageJsonPath, packageJson, { spaces: 2 });
};

Expand Down

0 comments on commit c424e16

Please sign in to comment.