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 Metafile types to account for non-JS assets #726

Closed
wants to merge 1 commit into from

Conversation

iamakulov
Copy link

@iamakulov iamakulov commented Jan 30, 2021

In the metafile output, some non-JS output assets don’t have imports and/or exports fields in the metafile. This change fixes the TS types accordingly.

Screen Shot 2021-01-30 at 13 07

Some non-JS output assets don’t have `imports` and/or `exports` fields in the metafile. This change fixes the TS types accordingly.
@iamakulov
Copy link
Author

I’m not sure where the source code for esbuild.github.io is, so I didn’t update it – but I believe https://esbuild.github.io/api/#metafile will also need to be changed accordingly.

@evanw
Copy link
Owner

evanw commented Jan 30, 2021

Thanks for the PR. However, I think the metafile would be easier to use if these properties were just always present. So I'm going to fix this problem that way instead. Then you shouldn't have to check for undefined in these places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants