mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 01:15:58 +00:00
feat(nuxi): clear cache on upgrade (#2936)
This commit is contained in:
parent
00e8a6e9d4
commit
6e06d2b4c9
@ -44,6 +44,9 @@ export default defineNuxtCommand({
|
||||
execSync(`${packageManager} install`, { stdio: 'inherit' })
|
||||
} else {
|
||||
consola.info('Upgrading nuxt...')
|
||||
await fsp.rmdir('node_modules/.cache', { recursive: true })
|
||||
await fsp.rmdir(resolve(rootDir, '.nuxt'), { recursive: true })
|
||||
await fsp.rmdir('node_modules/.vite', { recursive: true })
|
||||
execSync(`${packageManager} ${packageManager === 'yarn' ? 'add' : 'install'} -D nuxt3@latest`, { stdio: 'inherit' })
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user