Environment
Node.js version v24.12.0
nuxt/cli version 3.31.2
Package manager npm 11.7.0
Nuxt version 4.2.2
Nitro version 2.12.9
Builder vite 7.2.7
Reproduction
update from 4.2.1 to 4.2.2 and rebuild .nuxt folder or create new vue component
Describe the bug
After running npm run dev, the file .nuxt/types/components.d.ts contains an incorrect path to components.
-
In version 4.2.1, the path is generated as:
'ComponentName': typeof import("../../app/components/component-name.vue")['default']
-
In version 4.2.2, the path is generated as:
'ComponentName': typeof import("../../app/components/component-name.vue").default
After this change, autocomplete and "Go to Declaration" in WebStorm (JetBrains) stop working.
If manually replace .default with ['default'], autocomplete works again.
Additional context
No response
Logs
Environment
Node.js version v24.12.0
nuxt/cli version 3.31.2
Package manager npm 11.7.0
Nuxt version 4.2.2
Nitro version 2.12.9
Builder vite 7.2.7
Reproduction
update from 4.2.1 to 4.2.2 and rebuild .nuxt folder or create new vue component
Describe the bug
After running npm run dev, the file .nuxt/types/components.d.ts contains an incorrect path to components.
In version 4.2.1, the path is generated as:
'ComponentName': typeof import("../../app/components/component-name.vue")['default']In version 4.2.2, the path is generated as:
'ComponentName': typeof import("../../app/components/component-name.vue").defaultAfter this change, autocomplete and "Go to Declaration" in WebStorm (JetBrains) stop working.
If manually replace .default with ['default'], autocomplete works again.
Additional context
No response
Logs