-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can not build AWS-JS-SDK v3 #2692
Comments
This specific error message is saying that esbuild resolved something like One of the problems here might be that the package author could be confusing ESM support with browser support. Node supports both ESM and CommonJS so when a package provides both ESM and CommonJS, the contents are expected to be the same code in different formats. It should be possible for esbuild to pick either ESM or CommonJS depending on which is more appropriate for the situation without causing any behavior changes. It's not expected that the ESM is code intended for the browser and that the CommonJS is code intended for node. Some problematic packages out there do that, but they should instead be using the If you want to try to work around these problematic packages, you could try messing with esbuild's main fields setting such as specifying |
Closing because there was no follow-up reply and because what esbuild is doing here sounds like expected behavior to me. |
…ion to FAQ Esbuild issue: evanw/esbuild#2692 Nuxt2/Webpackv4 issue: #2498 (comment)
…ion to FAQ (#2533) Esbuild issue: evanw/esbuild#2692 Nuxt2/Webpackv4 issue: #2498 (comment)
Hello,
I'm attempting to bundle a browser application that makes use of the amazon-chime-sdk-js which contains the @aws-sdk/client-chime-sdk-messaging. I've been unable to successfully bundle the application using Esbuild version 0.15.14 as it's attempting to use the non-browser version of the cjs distribution of the aws-js-sdk. The aws-js-sdk has multiple different distributions including a cjs and es version as well as browser runtimeConfigs for both. However Esbuild seems to be for some reason defaulting to cjs distribution even when
--format=esm
is used and doesn't seem to be using the browser distribution.Verbose logs of finding but not using the es distribution:
Error being produced:
The text was updated successfully, but these errors were encountered: