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
Do not treat string.replace as side effect when used with a literal #4494
Conversation
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#string-replace-side-effects or load it into the REPL: |
Codecov Report
@@ Coverage Diff @@
## master #4494 +/- ##
==========================================
- Coverage 98.74% 98.74% -0.01%
==========================================
Files 207 207
Lines 7343 7342 -1
Branches 2082 2081 -1
==========================================
- Hits 7251 7250 -1
Misses 33 33
Partials 59 59
Continue to review full report at Codecov.
|
f5aa8ff
to
c1ff8b3
Compare
Confirmed to be working locally with With regards to mrdoob/three.js#24006 it didn't make too much of a difference as many of those declarations are still being used, but in my tests it does remove a little bit more unused code. 🙂 |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
This improves side effect detection for
String.prototype.replace
andString.prototype.replaceAll
by not treating them as side effects when used with literals as second argument.