From 8f4f4eadf1d64e9c7781cc19697cd27cb3a0dbbf Mon Sep 17 00:00:00 2001 From: Bobbie Goede Date: Fri, 6 Dec 2024 23:55:19 +0100 Subject: [PATCH 1/2] fix: `cleanup` not removing `.nuxt` directory --- src/utils/nuxt.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/nuxt.ts b/src/utils/nuxt.ts index 575df5584..26285a45d 100644 --- a/src/utils/nuxt.ts +++ b/src/utils/nuxt.ts @@ -21,6 +21,7 @@ export async function cleanupNuxtDirs(rootDir: string, buildDir: string) { await rmRecursive( [ buildDir, + '.nuxt', '.output', 'dist', 'node_modules/.vite', From 2f1f6a3563f996acdff63830e5edb6d529c8c6da Mon Sep 17 00:00:00 2001 From: Bobbie Goede Date: Sat, 7 Dec 2024 00:22:34 +0100 Subject: [PATCH 2/2] fix: load dev config --- src/commands/cleanup.ts | 2 +- src/utils/nuxt.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/cleanup.ts b/src/commands/cleanup.ts index f81e0d024..5c5648319 100644 --- a/src/commands/cleanup.ts +++ b/src/commands/cleanup.ts @@ -17,7 +17,7 @@ export default defineCommand({ async run(ctx) { const cwd = resolve(ctx.args.cwd || ctx.args.rootDir || '.') const { loadNuxtConfig } = await loadKit(cwd) - const nuxtOptions = await loadNuxtConfig({ cwd }) + const nuxtOptions = await loadNuxtConfig({ cwd, overrides: { dev: true } }) await cleanupNuxtDirs(nuxtOptions.rootDir, nuxtOptions.buildDir) }, }) diff --git a/src/utils/nuxt.ts b/src/utils/nuxt.ts index 26285a45d..575df5584 100644 --- a/src/utils/nuxt.ts +++ b/src/utils/nuxt.ts @@ -21,7 +21,6 @@ export async function cleanupNuxtDirs(rootDir: string, buildDir: string) { await rmRecursive( [ buildDir, - '.nuxt', '.output', 'dist', 'node_modules/.vite',