reduce lodash size
This commit is contained in:
parent
0360672d49
commit
3da20697ca
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -3795,6 +3795,14 @@
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
|
||||||
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
|
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
|
||||||
},
|
},
|
||||||
|
"lodash-webpack-plugin": {
|
||||||
|
"version": "0.11.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash-webpack-plugin/-/lodash-webpack-plugin-0.11.4.tgz",
|
||||||
|
"integrity": "sha1-bD7Lo9S40ktTlAtjVCcVxe08SsU=",
|
||||||
|
"requires": {
|
||||||
|
"lodash": "4.17.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"lodash._basecallback": {
|
"lodash._basecallback": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/lodash._basecallback/-/lodash._basecallback-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/lodash._basecallback/-/lodash._basecallback-3.3.1.tgz",
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
"intersection-observer": "^0.5.0",
|
"intersection-observer": "^0.5.0",
|
||||||
"intl-relativeformat": "^2.1.0",
|
"intl-relativeformat": "^2.1.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
|
"lodash-webpack-plugin": "^0.11.4",
|
||||||
"marky": "^1.2.0",
|
"marky": "^1.2.0",
|
||||||
"node-fetch": "^1.7.3",
|
"node-fetch": "^1.7.3",
|
||||||
"node-sass": "^4.7.2",
|
"node-sass": "^4.7.2",
|
||||||
|
|
|
@ -3,6 +3,7 @@ const config = require('sapper/webpack/config.js')
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
||||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||||
|
var LodashModuleReplacementPlugin = require('lodash-webpack-plugin')
|
||||||
|
|
||||||
const isDev = config.dev;
|
const isDev = config.dev;
|
||||||
|
|
||||||
|
@ -63,6 +64,7 @@ module.exports = {
|
||||||
}),
|
}),
|
||||||
/* disable while https://github.com/sveltejs/sapper/issues/79 is open */
|
/* disable while https://github.com/sveltejs/sapper/issues/79 is open */
|
||||||
//new ExtractTextPlugin('main.css'),
|
//new ExtractTextPlugin('main.css'),
|
||||||
|
new LodashModuleReplacementPlugin(),
|
||||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||||
new UglifyJSPlugin(),
|
new UglifyJSPlugin(),
|
||||||
new BundleAnalyzerPlugin({ // generates report.html and stats.json
|
new BundleAnalyzerPlugin({ // generates report.html and stats.json
|
||||||
|
|
Loading…
Reference in a new issue