1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Add webpack-bundle-analyzer

This commit is contained in:
Denis Demchenko 2019-06-16 23:57:50 +03:00
parent f5c939518e
commit ac1ec4a6c3
3 changed files with 6429 additions and 3088 deletions

9452
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -48,6 +48,7 @@
"sinon": "^7.3.2", "sinon": "^7.3.2",
"testem": "^2.17.0", "testem": "^2.17.0",
"webpack": "^4.35.3", "webpack": "^4.35.3",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.3.6", "webpack-cli": "^3.3.6",
"yamljs": "^0.3.0" "yamljs": "^0.3.0"
}, },
@ -65,6 +66,8 @@
"scripts": { "scripts": {
"build": "webpack --config webpack.config.js", "build": "webpack --config webpack.config.js",
"generate-and-deploy-docs": "npm run generate-docs && gh-pages --dist docs --dest docs", "generate-and-deploy-docs": "npm run generate-docs && gh-pages --dist docs --dest docs",
"watch": "webpack --watch --config webpack.config.js",
"deploy": "jsdoc -c jsdoc.json && gh-pages --dist docs --dest docs",
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"lint": "eslint ./src", "lint": "eslint ./src",
"testem": "testem", "testem": "testem",

View File

@ -1,6 +1,10 @@
const path = require('path'); const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
module.exports = { module.exports = {
plugins: [
new BundleAnalyzerPlugin(),
],
mode: 'production', // "production" | "development" | "none" mode: 'production', // "production" | "development" | "none"
// Chosen mode tells webpack to use its built-in optimizations accordingly. // Chosen mode tells webpack to use its built-in optimizations accordingly.
entry: { entry: {