Skip to content
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

Fix to avoid minification problem with esbuild #1368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core-js/internals/uid.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var uncurryThis = require('../internals/function-uncurry-this');

var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.0.toString);
var toString = uncurryThis(1.1.toString);
Copy link
Owner

@zloirock zloirock Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bug on your minificator side. I already added some workarounds for such kind of parser / minificator bugs to this line (for example, 1..toString -> 1.0.toString), but I don't think we should encourage these bugs any further. I can accept this PR for compatibility with old versions of this tool (because it costs just 1 byte of compressed code), but only in case if this bug will be fixed in this tool itself.


module.exports = function (key) {
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
Expand Down