Skip to content

Commit

Permalink
added some configuration and optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Plaza committed Jan 15, 2017
1 parent 38f9a1c commit a9dc961
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
bundle install &&
npm install &&
npm run build &&
sh ./generate-static.sh &
sh ./generate-static.sh &&
bundle exec jekyll serve
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"webpack": "webpack --progress --colors",
"dev": "webpack-dev-server --progress --colors",
"start": "npm run dev",
"build": "webpack --progress -p --colors",
"jekyll": "webpack --progress -p --colors -w",
"build": "webpack --config webpack.prod.config.js --progress -p --colors",
"jekyll": "webpack --config webpack.dev.config.js --progress -p --colors -w",
"production": "webpack --progress -p --colors -w"
},
"repository": {
Expand Down Expand Up @@ -37,14 +37,17 @@
"node-sass": "^4.1.1",
"npm": "^4.0.5",
"style-loader": "^0.13.1",
"webpack": "^1.14.0"
"webpack": "^1.14.0",
"webpack-bundle-analyzer": "^2.2.1"
},
"dependencies": {
"axios": "^0.15.3",
"babel-cli": "^6.18.0",
"babel-preset-stage-1": "^6.16.0",
"classnames": "^2.2.5",
"compression-webpack-plugin": "^0.3.2",
"css-loader": "^0.26.1",
"dedupe-plugin": "^1.0.0",
"dompurify": "^0.8.4",
"ejs": "^2.5.5",
"eslint-config-rallycoding": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/_assets/js/bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var webpack = require('webpack');
var fs = require('fs');
var path = require('path');

var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;


module.exports = {
Expand Down Expand Up @@ -40,12 +40,14 @@ module.exports = {
},
],
plugins: [
/* new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}), */
new webpack.optimize.UglifyJsPlugin()
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
}),
new webpack.optimize.UglifyJsPlugin(),
new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: 8880
})
]
},
resolve: {
Expand Down

0 comments on commit a9dc961

Please sign in to comment.