N
Nuxt2mo ago
Jox

VS Codium - Saving .vue file adds imports outside of <script>

Has anyone had the problem of any imports you have within a <script> in a .vue file, on saving the file the imports get duplicated outside of the <script>? I believe this has been happening ever since upgrading our Nuxt app to v4 but I'm not sure that's related. VS Codium is basically unusable because it's impossible to save a .vue file without this happening. In the video I'm just showing what happens when the file is saved.
2 Replies
kapa.ai
kapa.ai2mo ago
Hi @Jox. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources do not contain any information about VS Codium or issues where saving a .vue file causes imports to be duplicated outside of the <script> block. The documentation and issues referenced focus on Nuxt's auto-import system, configuration, and related warnings, but do not mention editor-specific behaviors or bugs like the one you described. If this issue started after upgrading to Nuxt v4, it may be related to changes in auto-imports or how your editor's extensions interact with Nuxt's new features, but there is no explicit mention of such a problem in the provided sources. You may want to check your VS Codium extensions (such as Vetur or Volar) and their compatibility with Nuxt v4, or consult the Nuxt community for editor-specific troubleshooting. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@525765413322227742> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?