Skip to content

clean up up cache dirs on rootDir/hash change #14604

@danielroe

Description

@danielroe

we've had a number of issues tied back somehow to cache not being properly invalidated, such as when a project directory is moved or renamed, a transform is updated within nuxt, or a downstream package is updated. These seem to tie back to invalid caches.

Vite already invalidates its cache in certain conditions:
https://github.com/vitejs/vite/blob/ed0286186b24748ec7bfa336f83c382363a22f1d/packages/vite/src/node/optimizer/index.ts#L1034-L1055

This issue is to track the possible causes of cache failure and invalidate them ourselves.

Possibly related: #14585


Current solution: Run npx nuxi-edge@latest cleanup after dependency upgrades and before nuxt dev manually to ensure caches are cleaned up.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions