-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RSC: No need to patch Vite anymore (#9636)
- Loading branch information
Showing
2 changed files
with
0 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import fs from 'fs' | ||
import path from 'path' | ||
|
||
import execa from 'execa' | ||
import { Listr } from 'listr2' | ||
|
||
import { prettify } from '@redwoodjs/cli-helpers' | ||
|
@@ -350,46 +349,6 @@ export const handler = async ({ force, verbose }) => { | |
}) | ||
}, | ||
}, | ||
{ | ||
title: 'Patch vite', | ||
task: async () => { | ||
const vitePatchTemplate = fs.readFileSync( | ||
path.resolve( | ||
__dirname, | ||
'templates', | ||
'rsc', | ||
'vite-npm-4.4.9-e845c1bbf8.patch.template' | ||
), | ||
'utf-8' | ||
) | ||
|
||
const yarnPatchDir = path.join(rwPaths.base, '.yarn', 'patches') | ||
const vitePatchPath = path.join( | ||
yarnPatchDir, | ||
'vite-npm-4.4.9-e845c1bbf8.patch' | ||
) | ||
writeFile(vitePatchPath, vitePatchTemplate, { | ||
overwriteExisting: force, | ||
}) | ||
|
||
const packageJsonPath = path.join(rwPaths.base, 'package.json') | ||
const packageJson = JSON.parse( | ||
fs.readFileSync(packageJsonPath, 'utf-8') | ||
) | ||
packageJson.resolutions = packageJson.resolutions || {} | ||
packageJson.resolutions['[email protected]'] = | ||
'patch:vite@npm%3A4.4.9#./.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch' | ||
writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), { | ||
overwriteExisting: true, | ||
}) | ||
|
||
await execa('yarn install', { | ||
stdio: 'ignore', | ||
shell: true, | ||
cwd: rwPaths.base, | ||
}) | ||
}, | ||
}, | ||
{ | ||
task: () => { | ||
printTaskEpilogue(command, description, EXPERIMENTAL_TOPIC_ID) | ||
|
19 changes: 0 additions & 19 deletions
19
...ages/cli/src/commands/experimental/templates/rsc/vite-npm-4.4.9-e845c1bbf8.patch.template
This file was deleted.
Oops, something went wrong.