From 7264c32aab051547c599dc9fce7c8cbfac9e470f Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Sun, 30 Jun 2019 19:03:52 +0530 Subject: [PATCH 1/2] Use babel-plugin-lodash to redue bundle size --- .babelrc | 3 +++ package.json | 1 + yarn.lock | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/.babelrc b/.babelrc index b207aef..719c25f 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,7 @@ { + "plugins": [ + "lodash" + ], "presets": [ "env" ] diff --git a/package.json b/package.json index d09ba15..22a7881 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "devDependencies": { "babel-core": "^6.26.0", "babel-loader": "^7.1.3", + "babel-plugin-lodash": "^2.3.0", "babel-preset-env": "^1.6.1", "chai": "^4.1.2", "husky": "^0.14.3", diff --git a/yarn.lock b/yarn.lock index e4d9e7a..5e76b04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -553,6 +553,13 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-lodash@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-2.3.0.tgz#4166c8f3ca52aa95be9e1839d24583e70a857ec2" + integrity sha1-QWbI88pSqpW+nhg50kWD5wqFfsI= + dependencies: + lodash "^4.0.0" + babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" From d426b8cd554d7963a0166456a1173165697ebab9 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Sun, 30 Jun 2019 22:12:26 +0530 Subject: [PATCH 2/2] Don't exclude node_modules from babel-loader --- webpack.config.babel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 42ec451..bbd32b1 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -18,7 +18,6 @@ const config = { rules: [ { test: /\.js$/, - exclude: /node_modules/, use: { loader: 'babel-loader' }