From c504bfdc83e8e681b97af6cbd398164b811c3d64 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Wed, 3 Jan 2018 17:35:51 -0800 Subject: [PATCH] Webpack stats --- .gitignore | 1 + config/webpack.prod.js | 1 + package.json | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ceb5122b2..2885433ac 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ dist node_modules/* .env npm-debug.log +stats.json .DS_Store fakes3/* diff --git a/config/webpack.prod.js b/config/webpack.prod.js index c3486447c..799b5c185 100644 --- a/config/webpack.prod.js +++ b/config/webpack.prod.js @@ -15,6 +15,7 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, { filename: 'bundle.[hash].js', publicPath: '/static/', }, + stats: "normal" }); productionWebpackConfig.plugins.push( new HtmlWebpackPlugin({ diff --git a/package.json b/package.json index 1d3583ede..fbac1f2c0 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "clean": "rimraf dist", "build:webpack": "NODE_ENV=production webpack --config config/webpack.prod.js", - "build:analyze": "NODE_ENV=production webpack --config config/webpack.prod.js --json | webpack-bundle-size-analyzer", + "build:analyze": "NODE_ENV=production webpack --config config/webpack.prod.js --json > stats.json", "build": "npm run clean && npm run build:webpack", "start": "NODE_ENV=production node index.js", "dev": "NODE_ENV=development nodemon --watch server index.js", @@ -202,4 +202,4 @@ "raf": "^3.4.0", "react-test-renderer": "^16.1.0" } -} \ No newline at end of file +}