You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not yet have a consistent repro for this locally, but at first glance this might be due to inconsistent behavior between Webpack and TypeScript. TypeScript does not yet support "module" exports in package.json, so this could possibly be a conflict between what Webpack resolves for import 'whatwg-fetch' vs what TS resolves. This is by no means a definitive answer, so I will continue to investigate.
edit: sorry, I clicked close by mistake when posting the comment.
TypeScript Version: 3.7.5
Code
When I add
in my project with Webpack and run a command to build it or start watching for changes it fails with error
But it compiles just fine if add this line later when Webpack is already watching for changes in files.
whatwg-fetch
has the following in itspackage.json
:The problem occurs when the module export picked by default, when I point to the script exported as main with
everything works fine.
I have the following tsconfig:
Related Issues: #10268
The text was updated successfully, but these errors were encountered: