-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Module resolution problems #342
Comments
Try this in a |
Whys it imported from a FYI Setting |
webpack is a library. CLI is not the only way to use it. |
Could've just said "I'm using Webpack via Node rather than the CLI" instead of the snarky response. Feel free to submit a PR. |
🎉 This issue has been resolved in version 4.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Problem
This package doesn't play well with TypeScript when
moduleResolution
is set toNodeNext
.See https://arethetypeswrong.github.io/?p=esbuild-loader%404.0.2 for a detailed explanation of the problem.
Possible solutions:
"type": "module"
frompackage.json
dist/index.d.ts
->dist/index.d.cts
Expected behavior
I expected this line
to keep working after I changed the
moduleResolution
option intsconfig.json
fromNode
toNodeNext
.For now we use a dynamic import as a workaround.
Minimal reproduction URL
https://stackblitz.com/edit/node-1zhtpc?file=foo.ts&view=editor
Version
4.0.2
Node.js version
16+
Package manager
npm
Operating system
Windows
Contributions
The text was updated successfully, but these errors were encountered: