Skip to content

Commit

Permalink
feat(build): add webpackMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
tenretC committed May 2, 2018
1 parent 5a4445e commit ee46bef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/stark-build/config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const CircularDependencyPlugin = require("circular-dependency-plugin");
// Dev custom config
const webpackCustomConfig = require(helpers.root("config/webpack-custom-config.dev.json"));

const WebpackMonitor = require("webpack-monitor");

/**
* Webpack configuration
*
Expand Down Expand Up @@ -221,6 +223,19 @@ module.exports = function() {
exclude: /node_modules/,
// log warnings to webpack
failOnError: false
}),

/**
* Plugin: WebpackMonitor
* Description: This plugins give us information about the bundle size
* See: https://github.com/webpackmonitor/webpackmonitor
*/
new WebpackMonitor({
capture: true, // -> default 'true'
target: helpers.root("reports/webpack-monitor/stats.json"), // default -> '../monitor/stats.json'
launch: true, // -> default 'false'
port: 3030, // default -> 8081
excludeSourceMaps: true // default 'true'
})
],

Expand Down
1 change: 1 addition & 0 deletions packages/stark-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"webpack-dev-server": "2.11.2",
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
"webpack-merge": "4.1.2",
"webpack-monitor": "1.0.14",
"webpack-sha-hash": "2.0.0",
"write-file-webpack-plugin": "4.2.0"
},
Expand Down

0 comments on commit ee46bef

Please sign in to comment.