-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
broken d.ts in projects with default exports in separate files #193
Comments
I've been seeing the same issue for a while; thanks for providing the reproduction example, @megastels! I reckon this was caused by 16d24fa I'd love to see this addressed :-) Happy to help too, but not sure how much time I'll have in the coming weeks. |
@wessberg I managed to add a test case with the above example; as expected, it fails. However, I'm unsure where to continue - all my |
Came here to report this myself. Slightly different but similar scenario, and likely the same root cause. This is a pretty significant gap imho. Exporting default symbols is a very common use case. In my case: export * from './colors';
export { default as ThemePalette } from './ThemePalette';
export * from './darkThemePalette';
export * from './lightThemePalette'; The bottom three work (even the /** colors/index.ts */
export { default as TonalPalette } from './TonalPalette';
export { default as common } from './common';
export { default as aqua } from './aqua';
export { default as blue } from './blue';
export { default as gray } from './gray';
export { default as grey } from './gray';
export { default as green } from './green';
export { default as orange } from './orange';
export { default as purple } from './purple';
export { default as red } from './red';
export { default as yellow } from './yellow'; Those all end up like this in the rolled up export { default as TonalPalette, default as common, default as aqua, default as blue, default as gray, default as grey, default as green, default as orange, default as purple, default as red, default as yellow, ThemePalette, darkThemePalette, lightThemePalette }; |
I've hit this too. Is there a workaround? |
also hit this, am being told the answer is to abandon this and rollup for vite and vite-plugin-ts 😭 |
Also, hit this, Is there a walkaround now? |
This may not be the most helpful answer, but i ultimately switched to the official TS plugin for rollup: |
I just switched to |
plugin generates broken declarations
Reproduction
Simple example
A.ts
B.ts
entry point
config
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: