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 babili #1414

Closed
wants to merge 3 commits into from
Closed

Switch to babili #1414

wants to merge 3 commits into from

Conversation

thuringia
Copy link

Issue: Replace webpack's UglifyJS plugin with babili

What I did

These steps have been made the react app and the react-native app.

  1. Add babel-preset-babili and babili-webpack-plugin to package.json
  2. Add preset for production environment in .babelrc
  3. Replace UglifyJS plugin in webpack.prod.js

I have added the preset as well as the plugin due to issues with babili-webpack-plugin and dynamic imports or blocks of dead code. Running each file though the preset prevents these whereas the plugin will optimize the complete bundle including node_modules.

How to test

Create a production build.

fixes #1005

@codecov
Copy link

codecov bot commented Jul 5, 2017

Codecov Report

Merging #1414 into master will decrease coverage by 0.19%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1414     +/-   ##
=========================================
- Coverage   14.54%   14.35%   -0.2%     
=========================================
  Files         202      201      -1     
  Lines        4649     4613     -36     
  Branches      494      507     +13     
=========================================
- Hits          676      662     -14     
+ Misses       3554     3507     -47     
- Partials      419      444     +25
Impacted Files Coverage Δ
...ct-native/src/server/config/webpack.config.prod.js 0% <0%> (ø) ⬆️
app/react/src/server/config/webpack.config.prod.js 0% <0%> (ø) ⬆️
.../ui/src/modules/ui/components/left_panel/header.js 27.58% <0%> (-0.99%) ⬇️
addons/knobs/src/components/PropField.js 10.86% <0%> (ø) ⬆️
.../src/manager/containers/CommentsPanel/dataStore.js 34.78% <0%> (ø) ⬆️
...b/ui/src/modules/ui/components/down_panel/index.js 96% <0%> (ø) ⬆️
addons/storyshots/src/require_context.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/types/Number.js 8.06% <0%> (ø) ⬆️
addons/info/src/components/Props.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/api/configs/init_api.js 40.47% <0%> (ø) ⬆️
... and 37 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 251c563...23a1a92. Read the comment docs.

@ndelangen
Copy link
Member

Thanks for this PR!

Can you provide statistics on impact?
filesize, execution time, browser support?

@thuringia
Copy link
Author

I'll add some statistics over the weekend

@ndelangen ndelangen self-assigned this Jul 19, 2017
@ndelangen
Copy link
Member

I'm going to revisit this later.

@thuringia If you want to still add a impact analysis I would be super grateful !

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.

2 participants