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
Avoid conflicts with local variables named Symbol, Object, Promise #3971
Conversation
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via
or load it into the REPL: |
Codecov Report
@@ Coverage Diff @@
## master #3971 +/- ##
=======================================
Coverage 97.21% 97.21%
=======================================
Files 191 191
Lines 6704 6706 +2
Branches 1960 1961 +1
=======================================
+ Hits 6517 6519 +2
Misses 99 99
Partials 88 88
Continue to review full report at Codecov.
|
Is it possible to add to this list of local variables? As i'm currently getting this issue : zloirock/core-js#587 |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Resolves #3969
Description
For various features, Rollup relies on the global variables
Symbol
,Object
andPromise
working as intended. This can break if a module declares a variable of the same name in its top-level scope. This PR fixes it by making sure these names are always treated as reserved so that local variables are renamed if necessary.