-
Notifications
You must be signed in to change notification settings - Fork 509
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
example template should enable ES module interop #538
Comments
Yea the Would you like to submit a PR to fix that? I think it'd be ideal if it extended the root config and did any necessary overrides to be more explicit I personally agree on the default import as well and think a PR for that would be good too. |
So this was actually discussed and rejected in #152 . |
Actually, React just changed its import on Facebook dot com to be import * as React everywhere recently. It is (going to be?) the correct way to import React |
Currently the React template uses the non-standard TS default import syntax:
This is unnecessarily confusing for users and exists in the language for legacy reasons, and instead the
esModuleInterop
compiler option should be used that enables just using standard ES6 default import syntax:The main
tsconfig.json
already hasesModuleInterop
enabled, but the Parcel example even disablesallowSyntheticDefaultImports
for some reason.The text was updated successfully, but these errors were encountered: