Turn off esModulesInterop and allowSyntheticDefaultImports
See original GitHub issueDescribe the bug
These two typescript config option make it so that consumer must also set these settings. Read more from a core typescript member here.
After trying to speed up react-typescript-docgen
I found that these two options killl typechecking performance. just these options added 15 seconds to my startup time.
Expected behavior
We don’t force consumers to use these options.
All imports of react are like
import * as React from 'react';
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
TSConfig Option: esModuleInterop - TypeScript
Turning on esModuleInterop will fix both of these problems in the code transpiled by TypeScript. The first changes the behavior in the compiler, ......
Read more >Do I ever need explicit allowSyntheticDefaultImports if ...
According to the docs you shouldn't need to specify allowSyntheticDefaultImports explicitly if you have esModuleInterop enabled, ...
Read more >Compiler Options · typescript
For a full list of compiler options, please go to https://www.typescriptlang.org/docs/handbook/compiler-options.html. allowSyntheticDefaultImports. Allow ...
Read more >Module can only be default-imported using esModuleInterop flag
The error "Module can only be default-imported using esModuleInterop flag" occurs when we try to import a CommonJS module into an ES6 module....
Read more >Can anyone help me with this problem ? : r/learnjavascript
I tried these on the tsconfig file but the problem is still there :- "allowSyntheticDefaultImports": true,. "esModuleInterop": true,.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also volunteer to do this. It will probably require making a few PR to other repos.
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!