-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
transformer: define
does not share reference for objects
#7641
Comments
I'm not sure how many people relies on this behavior though |
after investigation,
So I am wondering if it is necessary to add this feature. |
It seems the reason was to reduce the bundle size rather than sharing the reference itself. evanw/esbuild#581 |
I see |
I want to reject this feature for now and evaluate the requirement when it is bought up again. The motivation and discussion in evanw/esbuild#581 is still unclear to me, and the I can't find any real examples of people using this feature. And also, the behaviour of esbuild documented in evanw/esbuild@a5288c6#diff-f312cd3ffe8d88cf424d3f0bd04b41e5b0ad36e549874b5688028bf9091a61f5R967 is
Personally, this feature is really confusing in the scope of the Let's revisit this requirement again when it is bought up again by a consumer. |
define
does not share reference for objectsdefine
does not share reference for objects
I'm going to close this as not planned for now, feel free to bring this up again when there is an actual requirement. |
esbuild try
Oxc outputs:
This has a different behavior.
The text was updated successfully, but these errors were encountered: