Skip to content
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

fix: dir export with trailing comma #235

Closed
wants to merge 1 commit into from
Closed

fix: dir export with trailing comma #235

wants to merge 1 commit into from

Conversation

westhide
Copy link

Description

when genarate exports from dirs , if the export statement have a trailing comma , unimport.modifyDynamicImports() will contain a blank name export (const : typeof import('./export')[''])

To fix this case, filter the exports with name!==''

Linked Issues

Additional context

Maybe this problem should resolve through fix the modifyDynamicImports function which from unjs/unimport ?

@antfu
Copy link
Member

antfu commented Jul 19, 2022

Nice catch! Probably better to fix in mlly with https://github.com/unjs/mlly/blob/df908fd509d7357265038b5fec414c41bd3ebd67/src/analyze.ts#L95

Thanks

@antfu antfu added the upstream label Jul 19, 2022
@westhide
Copy link
Author

upstream PR merged ,this commit can be closed

related unjs/mlly#59

@westhide westhide closed this Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants