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 TS failing if module is set to CommonJS #638

Merged
merged 1 commit into from
Jun 1, 2020
Merged

Fix TS failing if module is set to CommonJS #638

merged 1 commit into from
Jun 1, 2020

Conversation

marvinhagemeister
Copy link
Collaborator

TypeScript builds must always have the esm format, otherwise bundling fails. Due to testing setups (mocha/jasmine/...) users may have explicitly declared the module type to be CommonJS in tsconfig.json. This breaks microbundle.

To fix this we can silently overwrite the specified module type to the one we need and let TS take care of the rest.

Copy link
Collaborator

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! thanks!

@wardpeet wardpeet merged commit c8b46cf into master Jun 1, 2020
@wardpeet wardpeet deleted the ts-module branch June 1, 2020 11:11
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.

None yet

2 participants