Node Underground
May 23, 2022 · Frontend Development
Why allowSyntheticDefaultImports Alone Won’t Import React – Use esModuleInterop
This article explains how the TypeScript compiler options allowSyntheticDefaultImports and esModuleInterop affect importing React, showing the differences in emitted JavaScript and why the latter is needed for default imports to work correctly.
ReActTypeScriptallowSyntheticDefaultImports
0 likes · 4 min read
