How to create a package with the isolatedModules=true option enabled?

Posted by Ramesh Singh | Updated on

Want to create a package with the isolatedModules=true option enabled? Starting with CRA 3.4.1, type re-exports are much easier now. Contained Babel 7.9.0 version supports TS 3.8 type-only imports and exports. You can write:

PS: Current CRA version still has TS 3.7 as dependency. I had to do npm update typescript / yarn upgrade typescript followed by a VS Code restart to make the new syntax compile.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers