Skip to content

Commit

Permalink
⭐ webpack: add stats plugin to webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Aug 22, 2016
1 parent d7c225a commit 031f9b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ docs/_book/
npm-debug.log
selenium-debug.log
test/unit/coverage
test/e2e/reports
test/e2e/reports
stats.json
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"sass-loader": "3.2.0",
"sinon": "1.17.5",
"sinon-chai": "2.8.0",
"stats-webpack-plugin": "0.4.2",
"style-loader": "0.13.1",
"vue-hot-reload-api": "1.3.2",
"vue-html-loader": "1.2.3",
Expand All @@ -99,4 +100,4 @@
"babel-runtime": "6.11.6",
"vue": "1.0.26"
}
}
}
5 changes: 5 additions & 0 deletions webpack.build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var webpack = require("webpack");
var version = require("./package.json").version;
var banner = "/**\n" + " * vue-form-generator v" + version + "\n" + " * https://github.com/icebob/vue-form-generator\n" + " * Released under the MIT License.\n" + " */\n";
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var StatsPlugin = require('stats-webpack-plugin');

var loaders = [
{
Expand Down Expand Up @@ -36,6 +37,10 @@ module.exports = [
raw: true
}),
new ExtractTextPlugin('vue-form-generator.css', { allChunks: true }),
new StatsPlugin('../stats.json', {
chunkModules: true
//exclude: [/node_modules[\\\/]react/]
})
],

module: {
Expand Down

0 comments on commit 031f9b0

Please sign in to comment.