Open madskronborg opened 1 week ago
I'll fix this, but you should probably do from './components/index'
anyway. (And this should probably resolve the issue for now.)
I'll fix this, but you should probably do
from './components/index'
anyway. (And this should probably resolve the issue for now.)
Thank you for the quick reply and the great work on nuxt! :)
I hadn't thought about referencing the index file directly - I tested it and it does indeed fix the type referencing.
Appreciate the help :+1:
Reproduction
Stackblitz
Build command
:cd ~/projects/vitejs-vite-tu4fsx/my-module/ && npm run dev:build && npm run prepack
Describe the bug
After upgrading from 0.5.5 to 0.8.0 the generated bundle has invalid import paths for types that exist in subfolders.
We have e.g. the following structure in our nuxt module
runtime/
folder:Which results in the following build:
Where the path
./components.js
is invalid. It should be:./components
. I am also unsure whethercomponents/index.d.ts
in the build should export./Alert.js
orAlert.d.ts
.