Webpack stats

This commit is contained in:
Jori Lallo
2018-01-03 17:35:51 -08:00
parent 7a7f8f7c53
commit c504bfdc83
3 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@@ -2,5 +2,6 @@ dist
node_modules/*
.env
npm-debug.log
stats.json
.DS_Store
fakes3/*

View File

@@ -15,6 +15,7 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, {
filename: 'bundle.[hash].js',
publicPath: '/static/',
},
stats: "normal"
});
productionWebpackConfig.plugins.push(
new HtmlWebpackPlugin({

View File

@@ -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"
}
}
}