Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 3e6a80e

Browse files
committed
Use babel/webpack lodash plugins. Slight reduction in bundle size.
1 parent 4178e72 commit 3e6a80e

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

.babel.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module.exports = {
2222
['@babel/preset-typescript']
2323
],
2424
plugins: [
25-
"add-module-exports",
25+
'lodash',
26+
'add-module-exports',
2627
['@babel/plugin-transform-runtime', {
2728
corejs: 3,
2829
helpers: true,

package-lock.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"@typescript-eslint/parser": "^4.17.0",
8989
"babel-loader": "^8.2.2",
9090
"babel-plugin-add-module-exports": "^1.0.4",
91+
"babel-plugin-lodash": "^3.3.4",
9192
"babel-plugin-transform-class-properties": "^6.24.1",
9293
"benchmark": "^2.1.4",
9394
"buffer": "^6.0.3",
@@ -106,6 +107,7 @@
106107
"git-revision-webpack-plugin": "^3.0.6",
107108
"jest": "^26.6.3",
108109
"jest-circus": "^26.6.3",
110+
"lodash-webpack-plugin": "^0.11.6",
109111
"nightwatch": "^1.5.1",
110112
"process": "^0.11.10",
111113
"sinon": "^9.2.4",

webpack.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const path = require('path')
77

88
const webpack = require('webpack')
99
const TerserPlugin = require('terser-webpack-plugin')
10+
const LodashWebpackPlugin = require('lodash-webpack-plugin')
1011
const { merge } = require('webpack-merge')
1112
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
1213
const GitRevisionPlugin = require('git-revision-webpack-plugin')
@@ -105,6 +106,7 @@ module.exports = (env, argv) => {
105106
}
106107
},
107108
plugins: [
109+
new LodashWebpackPlugin(),
108110
new webpack.ProvidePlugin({
109111
process: 'process/browser',
110112
Buffer: ['buffer', 'Buffer'],

0 commit comments

Comments
 (0)