diff --git a/test/prepare.ts b/test/prepare.ts index cee55399c8..396313d307 100644 --- a/test/prepare.ts +++ b/test/prepare.ts @@ -1,5 +1,6 @@ import { fileURLToPath } from 'node:url' import fg from 'fast-glob' +import fs from 'fs-extra' import { execa } from 'execa' const dirs = await fg('*', { @@ -8,6 +9,13 @@ const dirs = await fg('*', { absolute: true }) +await Promise.all([ + // clear nuxt build files + ...dirs.map(dir => fs.remove(`${dir}/.nuxt`)), + // clear vite cache + ...dirs.map(dir => fs.remove(`${dir}/node_modules/.vite`), { force: true }) +]) + await Promise.all( dirs.map(dir => execa('pnpm', ['nuxi', 'prepare'], { cwd: dir })) )