Slow Development VSCode
Hello there ! Anyone is facing a slow Nuxt dev mode in Vscode ? I don't know if it's Volar ? VSCode or Nuxt
2 Replies
Hi @DevHunteer. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the knowledge sources provided, there are a few potential reasons for slow development mode in Nuxt when using VSCode. Here's what I can gather:
1. Dependency Optimization: Since Nuxt 3.8.1, some users have reported that Nuxt/Vite performs dependency optimization frequently, sometimes even on every page refresh. This can lead to full page reloads and slower development experience. Github Issue #24196 (https://github.com/nuxt/nuxt/issues/24196)
2. TypeScript/JavaScript Language Features: Some users have reported issues with VSCode's TypeScript/JavaScript language features taking a long time to initialize, which can slow down the development experience. Github Issue #26795 (https://github.com/nuxt/nuxt/issues/26795)
To potentially improve the situation, you could try the following:
1. Use the Nuxt DevTools to diagnose performance issues. You can enable it in your
nuxt.config.ts
:
Nuxt DevTools Module Options (https://devtools.nuxt.com/guide/getting-started#module-options)
2. If you're using pnpm, ensure you have nuxi
installed as a devDependency and try using the VS Code debug configuration provided in the Nuxt documentation (https://nuxt.com/docs/guide/going-further/debugging#debugging-in-your-ide).
3. Consider adding frequently used dependencies to the optimizeDeps.include
array in your Vite configuration to pre-bundle them and potentially speed up the development experience.
4. Ensure you're using the latest versions of Nuxt, VSCode, and the Vue extension for VSCode.
If the problem persists, it would be helpful to create a minimal reproduction of the issue and report it on the Nuxt GitHub repository, following the guidelines outlined in the Reporting Bugs (https://nuxt.com/docs/community/reporting-bugs) documentation.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@559342017755349015> Kapa.ai is still learning and improving, please let me know how I did by reacting below.