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:
src/
runtime/
types/
index.ts (export * from './components')
components/
index.ts (export * from './Alert')
Alert.ts
Which results in the following build:
dist/
runtime/
types/
index.d.ts (export * from './components.js')
components/
index.d.ts (export * from './Alert.js')
Alert.d.ts
Alert.js
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 or Alert.d.ts.