Skip to content

Commit ad24f07

Browse files
Merge pull request LucasBassetti#123 from Cyclodex/lodashBuildImprovements
Lodash build improvements
2 parents 0b5e263 + 0095f27 commit ad24f07

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets": ["es2015", "react"]
2+
"presets": ["es2015", "react"],
3+
"plugins": ["lodash"]
34
}

dist/react-simple-chatbot.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"babel-core": "^6.25.0",
5252
"babel-eslint": "^7.2.3",
5353
"babel-loader": "^7.1.1",
54+
"babel-plugin-lodash": "^3.3.4",
5455
"babel-polyfill": "^6.23.0",
5556
"babel-preset-es2015": "^6.24.1",
5657
"babel-preset-react": "^6.24.1",
@@ -65,6 +66,7 @@
6566
"eslint-plugin-react": "^7.0.1",
6667
"husky": "^0.13.3",
6768
"jsdom": "^9.12.0",
69+
"lodash-webpack-plugin": "^0.11.5",
6870
"mocha": "^3.4.2",
6971
"nyc": "^11.0.2",
7072
"react-addons-test-utils": "^15.6.2",
@@ -73,6 +75,7 @@
7375
"styled-components": "^2.4.1",
7476
"uglifyjs-webpack-plugin": "^0.4.6",
7577
"webpack": "^3.2.0",
78+
"webpack-bundle-analyzer": "^2.13.1",
7679
"webpack-dev-server": "^2.5.1"
7780
},
7881
"dependencies": {

webpack.config.prod.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const path = require('path');
22
const CleanWebpackPlugin = require('clean-webpack-plugin');
33
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
4+
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
5+
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
46

57
module.exports = {
68
entry: path.resolve(__dirname, 'lib/index'),
@@ -17,9 +19,11 @@ module.exports = {
1719
},
1820
plugins: [
1921
new CleanWebpackPlugin(['dist']),
22+
new LodashModuleReplacementPlugin(),
2023
new UglifyJsPlugin({
2124
comments: false,
2225
}),
26+
new BundleAnalyzerPlugin(),
2327
],
2428
module: {
2529
rules: [

0 commit comments

Comments
 (0)