-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Don't mangle function names for production builds #2705
Don't mangle function names for production builds #2705
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2705 +/- ##
=======================================
Coverage 34.35% 34.35%
=======================================
Files 390 390
Lines 8772 8772
Branches 911 916 +5
=======================================
Hits 3014 3014
- Misses 5136 5140 +4
+ Partials 622 618 -4
Continue to review full report at Codecov.
|
Thanks @pascalduez , totally makes sense |
Not sure if this should be applied to Angular, Vue builds as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this should be applied to Angular, Vue builds as well.
It should, please do that
48a980d
to
e5d29f2
Compare
@Hypnosphi Done. |
…ames Don't mangle function names for production builds
Issue:
Function names are mangled by UglifyJS during production build.
They are important for React stateless components, especially in a styleguide context such as Storybook. This allows playing nicely with third party libraries such as
react-element-to-jsx-string
.The issue happened after #2530.
What I did
Passed the
compress: { keep_fnames: true }
option to all production builds UglifyJS plugin.Did not noticed significant bundle size increase on our internal styleguide, which is quite large.
How to test
Is this testable with jest or storyshots? Nope
Does this need a new example in the kitchen sink apps? Nope
Does this need an update to the documentation? Nope
If your answer is yes to any of these, please make sure to include it in your PR.