Skip to content

Commit 76e85b2

Browse files
committed
add visualizer plugin
1 parent f6a9338 commit 76e85b2

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
.DS_Store
44
/app/dist
55
/dist
6+
stats.html

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
"vue-loader": "^8.5.3",
5555
"vue-style-loader": "^1.0.0",
5656
"webpack": "^1.13.1",
57-
"webpack-hot-middleware": "^2.12.1"
57+
"webpack-hot-middleware": "^2.12.1",
58+
"webpack-visualizer-plugin": "^0.1.5"
5859
},
5960
"dependencies": {
6061
"babel-runtime": "^6.9.2",

scripts/webpack.config.prod.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22
const webpack = require('webpack')
3+
const Visualizer = require('webpack-visualizer-plugin')
34
const config = require('./webpack.config')
45

56
config.plugins = config.plugins.concat([
@@ -14,6 +15,9 @@ config.plugins = config.plugins.concat([
1415
new webpack.DefinePlugin({
1516
'__DEV__': false,
1617
'process.env.NODE_ENV': JSON.stringify('production')
18+
}),
19+
new Visualizer({
20+
filename: '../../stats.html'
1721
})
1822
])
1923

0 commit comments

Comments
 (0)