-
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
Require a umd module as commonJS conflict with requirejs. #1348
Comments
It would be wrong for esbuild to shadow However, if you would like to do that yourself, you can use esbuild's define feature for this. An example would be I'm closing this issue because you can already configure esbuild to do this by yourself and is not a default behavior that should be added to esbuild for everyone. |
Even if this is not a perfect solution, I think this is still a bug of esbuid. To define the I think the best way is to do like the rollup. |
That's not true. The define feature in esbuild only replaces references to global variables. It does not replace references to local variables:
|
Yes, I got it wrong here. But I still hope that you can consider removing the umd wrapper to reduce this weird issue and produce a smaller bundle. |
Look at the out code below:
If
requirejs
has been load before, therequire_tslib()
will return an empty{}
.This will result an error like #746 .
To avoid this, can we wrrap the code like:
?
The text was updated successfully, but these errors were encountered: