Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
BundleAnalyzerPlugin options update
Browse files Browse the repository at this point in the history
  • Loading branch information
greglobinski committed Feb 10, 2018
1 parent 5c9fea1 commit 491a945
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Expand Up @@ -26,7 +26,7 @@
"func-names": "off",
"global-require": "warn",
"import/no-dynamic-require": "warn",
"import/no-extraneous-dependencies": "warn",
"import/no-extraneous-dependencies": "off",
"no-console": "off",
"no-multi-assign": "off",
"no-param-reassign": "warn",
Expand Down
15 changes: 8 additions & 7 deletions gatsby-node.js
Expand Up @@ -5,13 +5,6 @@ const _ = require("lodash");
exports.modifyWebpackConfig = ({ config, stage }) => {
switch (stage) {
case "build-javascript":
config.plugin("webpack-bundle-analyzer", BundleAnalyzerPlugin, [
{
analyzerMode: "static",
reportFilename: "./static/report.html",
generateStatsFile: true
}
]);
config.plugin("CommonsChunkPlugin", webpack.optimize.CommonsChunkPlugin, [
{
name: `commons`,
Expand Down Expand Up @@ -56,6 +49,14 @@ exports.modifyWebpackConfig = ({ config, stage }) => {
}
}
]);
config.plugin("BundleAnalyzerPlugin", BundleAnalyzerPlugin, [
{
analyzerMode: "static",
reportFilename: "./report.html",
openAnalyzer: true,
logLevel: "error"
}
]);

break;
}
Expand Down

0 comments on commit 491a945

Please sign in to comment.