You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue with the Vite legacy plugin when generating the index-legacy. The produced code uses Object.defineProperty to define a property with the key "name". However, on Safari 9, "name" is a protected key, causing an error during execution.
Attempting to change configurable attribute of unconfigurable property
Generated code example:
var nt = Object.defineProperty,
at = u("az", function (a, l) {
return nt(a, "name", { value: l, configurable: !0 });
});
By replacing "name" with a different key, such as "property", the issue is resolved.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Hello @pecoram. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs reproduction will be closed if they have no activity within 3 days.
Describe the bug
I encountered an issue with the Vite legacy plugin when generating the index-legacy. The produced code uses Object.defineProperty to define a property with the key "name". However, on Safari 9, "name" is a protected key, causing an error during execution.
Attempting to change configurable attribute of unconfigurable property
Generated code example:
By replacing "name" with a different key, such as "property", the issue is resolved.
Reproduction
no-url
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: