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

keepNames breaks on Chrome 38 / Safari 9 #1272

Open
pecoram opened this issue Jan 17, 2025 · 1 comment
Open

keepNames breaks on Chrome 38 / Safari 9 #1272

pecoram opened this issue Jan 17, 2025 · 1 comment

Comments

@pecoram
Copy link

pecoram commented Jan 17, 2025

Hi,
When the keepNames option is enabled, the generated code includes the following snippet:

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

However, this code is not compatible with older browsers like Chrome 38 or Safari 9, as the "name" property is protected and returns the following error:

Attempting to change configurable attribute of unconfigurable property

After testing, I found that manually replacing "name" with another string (e.g., "propertyName") resolves the issue.

Would it be possible to replace "name" with a different string?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@pecoram and others