Smaller production builds

Builds on the exclusion of PropTypes from production builds:

- Remove 'lodash' and use smaller modules for equivalent functions.
- Remove use of some unnecessary Facebook utilities.
- Remove 'TouchableBounce'; it isn't part of React Native anymore.
- Remove stray import of 'react-dom/server'.
- Exclude 'StyleSheetValidation' from production.

Measuring the UMD build (gzip)…

Before: ~100KB
After: ~60KB
This commit is contained in:
Nicolas Gallagher
2016-11-22 16:25:58 -08:00
parent d65c92eea9
commit 722d77e8e5
21 changed files with 74 additions and 440 deletions
+4 -1
View File
@@ -25,7 +25,10 @@ module.exports = {
path: DIST_DIRECTORY
},
plugins: [
new BundleAnalyzerPlugin({ analyzerMode: 'static' }),
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: false
}),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
new webpack.optimize.DedupePlugin(),
// https://github.com/animatedjs/animated/issues/40