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

Switch to UglifyJS that supports ES6 and up #2530

Merged
merged 2 commits into from
Dec 25, 2017

Conversation

ggarek
Copy link
Contributor

@ggarek ggarek commented Dec 22, 2017

Issue:

What I did

Use uglify-es through uglifyjs-webpack-plugin to be able to minify es6+ code.

I stumbled upon same issue, then found this PR, which was not very active recently. So i submit this PR in continuation to original one.

How to test

I tested as proposed in the original PR. Here are some screenshots.

Build time (is ~28s)
screen shot 2017-12-22 at 16 04 26

Bundle size

1.8M	storybook-static/static/manager.84cf3a1cca5073d55149.bundle.js
1.2M	storybook-static/static/preview.09c4e2758e41ca532a7c.bundle.js

screen shot 2017-12-22 at 16 14 57

Note
I have no opportunity to check IE 😭

@ndelangen ndelangen self-requested a review December 22, 2017 07:24
@Hypnosphi Hypnosphi self-requested a review December 22, 2017 08:45
@Hypnosphi Hypnosphi changed the base branch from master to release/3.3 December 22, 2017 08:46
@Hypnosphi
Copy link
Member

I changed base to release/3.3. Would you mind resolving the conflicts?

@ndelangen
Copy link
Member

@ggarek Amazing you want to pick this up, thank you so much!

I would love to merge this as soon as possible.

I do think we need to adjust this not just for react and react-native, but also for Vue and Angular.
Would you be able to do that too? Please ask for help if you need it 👍

@ndelangen ndelangen changed the base branch from release/3.3 to master December 23, 2017 22:54
# Conflicts:
#	app/react-native/src/server/config/webpack.config.prod.js
#	app/react/src/server/config/webpack.config.prod.js
#	yarn.lock
@storybookjs storybookjs deleted a comment from codecov bot Dec 25, 2017
@ndelangen
Copy link
Member

merged in master after the 3.3 merge (saved you the plain of the merge conflicts) and added the code to angular & vue

@codecov
Copy link

codecov bot commented Dec 25, 2017

Codecov Report

Merging #2530 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2530      +/-   ##
==========================================
- Coverage   32.69%   32.68%   -0.01%     
==========================================
  Files         398      398              
  Lines        8837     8838       +1     
  Branches      947      934      -13     
==========================================
  Hits         2889     2889              
- Misses       5298     5333      +35     
+ Partials      650      616      -34
Impacted Files Coverage Δ
app/react/src/server/config/webpack.config.prod.js 0% <ø> (ø) ⬆️
app/vue/src/server/config/webpack.config.prod.js 0% <ø> (ø) ⬆️
...p/angular/src/server/config/webpack.config.prod.js 0% <ø> (ø) ⬆️
...ct-native/src/server/config/webpack.config.prod.js 0% <0%> (ø) ⬆️
app/vue/src/server/config/babel.js 0% <0%> (-100%) ⬇️
...-native/src/preview/components/OnDeviceUI/index.js 0% <0%> (ø) ⬆️
addons/knobs/src/react/WrapStory.js 49.42% <0%> (ø) ⬆️
addons/info/src/components/Story.js 88.88% <0%> (ø) ⬆️
...react-native/src/manager/components/PreviewHelp.js 0% <0%> (ø) ⬆️
addons/jest/src/components/Result.js 0% <0%> (ø) ⬆️
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 154e7a3...10cd0b2. Read the comment docs.

@ndelangen
Copy link
Member

CRA
Vue
Angular

@ndelangen ndelangen added configuration babel / webpack maintenance User-facing maintenance tasks and removed app: aurelia labels Dec 25, 2017
@ndelangen ndelangen changed the title SWITCH to UglifyJS-es Switch to UglifyJS that supports ES6 and up Dec 25, 2017
@ndelangen ndelangen self-assigned this Dec 25, 2017
@ndelangen
Copy link
Member

Anyone from @storybooks/team want to review and possibly merge?

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

Successfully merging this pull request may close these issues.

4 participants