-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Regression when updating to 0.14.22. #2026
Comments
Did you set Also see #2023. |
Yes I do have "type": "module". How can I make esbuild not wrap the library to mimic the nodejs behaviour? |
This happens because esbuild now behaves the same as Webpack in this case, and Webpack also does the same thing here. Setting |
I just published some documentation about this here: https://esbuild.github.io/content-types/#default-interop. It describes what the problem is, some background about where the problem comes from, and the heuristics esbuild uses to address this problem. This behavior is by design and is critical for Webpack and Node compatibility. Closing as "working as intended." |
- evanw/esbuild#2026 - https://github.com/flex-development/toggle-pkg-type Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
I'm having some problems importing ESModule (that declare __esModule as true but use requires) in the newest version of esbuild. Basically the default import is considered as being a * import for some reasons. I haven't had time to check every single version but 0.14.22 doesn't work as expected, 0.14.3 works as expected.
test.ts
Output with 0.14.22
Output with 0.14.3
Any ideas if it's an issue with my setup instead?
Thank you!
The text was updated successfully, but these errors were encountered: