Skip to content

Conversation

@BobbieGoede
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Resolves #533

It seems like, after running the dev server when using compatibilityVersion: 4, loading the nuxt config will no longer give the configured buildDir which will instead be set to something like /node_modules/.cache/nuxt/.nuxt. This is not very useful as we're already clearing the /node_modules/.cache directory with this command.

I'm not entirely sure what causes this change, but I did find that passing overrides: { dev: true } to loadNuxtConfig returns the expected values, not sure if this has other unintended consequences, we're only using the rootDir and buildDir from the loaded config.

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (main@207d0f0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/commands/cleanup.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main    #590   +/-   ##
======================================
  Coverage        ?   1.29%           
======================================
  Files           ?      44           
  Lines           ?    2864           
  Branches        ?      44           
======================================
  Hits            ?      37           
  Misses          ?    2785           
  Partials        ?      42           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@danielroe danielroe changed the title fix: cleanup not removing .nuxt directory fix(cleanup): remove dev buildDir, not production Dec 7, 2024
@danielroe
Copy link
Member

(In v4 mode, the buildDir is actually located in that cache folder so multiple builds can happen in parallel with a dev server.)

@danielroe danielroe merged commit b96c38e into nuxt:main Dec 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nuxi Cleanup does not seem to clear Nuxt files in v4

3 participants