File tree 3 files changed +18
-2
lines changed
3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const autoprefixer = require('autoprefixer')
5
5
const px2rem = require ( 'postcss-px2rem' )
6
6
const fs = require ( 'fs' )
7
7
const path = require ( 'path' )
8
+ const StatsWriterPlugin = require ( 'webpack-stats-plugin' ) . StatsWriterPlugin
8
9
9
10
const fileNameTransfer = fileName => fileName . match ( / [ A - Z ] [ a - z ] * / g) . map ( ( e ) => e . toLowerCase ( ) ) . join ( '-' )
10
11
@@ -85,7 +86,10 @@ module.exports = {
85
86
new CleanPlugin ( [ 'lib' ] , {
86
87
root : path . resolve ( __dirname , '../' ) ,
87
88
} )
88
- ]
89
+ ] ,
90
+ resolve : {
91
+ modules : [ 'node_modules' ]
92
+ }
89
93
}
90
94
91
95
if ( process . env . NODE_ENV === 'production' ) {
@@ -97,6 +101,13 @@ if(process.env.NODE_ENV === 'production') {
97
101
warnings : false
98
102
}
99
103
} ) )
104
+ // module.exports.plugins.push(new StatsWriterPlugin({
105
+ // filename: 'stats.json',
106
+ // transform: function(data, opts) {
107
+ // let stats = opts.compiler.getStats().toJson({chunkModules: true})
108
+ // return JSON.stringify(stats, null, 2)
109
+ // }
110
+ // }))
100
111
} else {
101
112
module . exports . devtool = 'eval-source-map'
102
113
}
Original file line number Diff line number Diff line change 90
90
"vue-style-loader" : " ^2.0.5" ,
91
91
"vue-template-compiler" : " ^2.2.6" ,
92
92
"webpack" : " ^2.3.2" ,
93
- "webpack-dev-server" : " ^2.2.0"
93
+ "webpack-dev-server" : " ^2.2.0" ,
94
+ "webpack-stats-plugin" : " ^0.1.5"
94
95
}
95
96
}
Original file line number Diff line number Diff line change @@ -6750,6 +6750,10 @@ webpack-sources@^0.2.3:
6750
6750
source-list-map "^1.1.1"
6751
6751
source-map "~0.5.3"
6752
6752
6753
+ webpack-stats-plugin@^0.1.5 :
6754
+ version "0.1.5"
6755
+ resolved "https://registry.yarnpkg.com/webpack-stats-plugin/-/webpack-stats-plugin-0.1.5.tgz#29e5f12ebfd53158d31d656a113ac1f7b86179d9"
6756
+
6753
6757
webpack@^2.3.2 :
6754
6758
version "2.3.2"
6755
6759
resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.3.2.tgz#7d521e6f0777a3a58985c69425263fdfe977b458"
You can’t perform that action at this time.
0 commit comments