-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type generation is broken for subfolders (subfolder is imported with .js extension) #308
Comments
I'll fix this, but you should probably do |
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 👍 |
I think fixing this issue or at least logging some warnings when importing from a folder index (without filename) will probably save us a lot of time debugging type issues in the future 😅 Not sure where to start to work on a fix 😥 |
Was just looking at this. I think maybe issue is upstream in |
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 whether
components/index.d.ts
in the build should export./Alert.js
orAlert.d.ts
.The text was updated successfully, but these errors were encountered: