ducky/web
16:5d47855181e1 Browse Files
Make production builds possible. Our production builds were erroring out, making it hard to deploy. This fixes things so that our production builds succeed, though I'm lying if I say I understand all the reasoning behind it. The major reasoning seems to be "BUGS".
build/200.html index.html package.json webpack.config.js
1.1 --- a/build/200.html Fri Jul 03 20:00:45 2015 -0400 1.2 +++ b/build/200.html Tue Jul 07 21:16:30 2015 -0400 1.3 @@ -6,6 +6,5 @@ 1.4 </head> 1.5 <body> 1.6 </body> 1.7 -<script src="/static/common.js"></script> 1.8 <script src="/static/bundle.js"></script> 1.9 </html>
2.1 --- a/index.html Fri Jul 03 20:00:45 2015 -0400 2.2 +++ b/index.html Tue Jul 07 21:16:30 2015 -0400 2.3 @@ -6,6 +6,5 @@ 2.4 </head> 2.5 <body> 2.6 </body> 2.7 -<script src="/static/common.js"></script> 2.8 <script src="/static/bundle.js"></script> 2.9 </html>
3.1 --- a/package.json Fri Jul 03 20:00:45 2015 -0400 3.2 +++ b/package.json Tue Jul 07 21:16:30 2015 -0400 3.3 @@ -14,8 +14,8 @@ 3.4 "andlog": "^1.0.0", 3.5 "babel": "^5.6.14", 3.6 "babel-loader": "^5.0.0", 3.7 - "css-loader": "^0.12.0", 3.8 - "extract-text-webpack-plugin": "^0.7.0", 3.9 + "css-loader": "~0.14.0", 3.10 + "extract-text-webpack-plugin": "~0.8.2", 3.11 "file-loader": "^0.8.1", 3.12 "find-root": "^0.1.1", 3.13 "jwt-decode": "^1.1.0", 3.14 @@ -35,7 +35,7 @@ 3.15 "sass-loader": "0.4.2", 3.16 "style-loader": "^0.12.0", 3.17 "url-loader": "^0.5.5", 3.18 - "webpack": "1.8.9", 3.19 + "webpack": "^1.9.11", 3.20 "xhr": "^2.0.2" 3.21 }, 3.22 "devDependencies": { 3.23 @@ -43,7 +43,7 @@ 3.24 "webpack-dev-server": "^1.8.2" 3.25 }, 3.26 "scripts": { 3.27 - "build": "NODE_ENV=production webpack", 3.28 + "build": "NODE_ENV=production webpack -p", 3.29 "start": "bin/dev-server", 3.30 "deploy": "surge ./build/" 3.31 }
4.1 --- a/webpack.config.js Fri Jul 03 20:00:45 2015 -0400 4.2 +++ b/webpack.config.js Tue Jul 07 21:16:30 2015 -0400 4.3 @@ -1,6 +1,5 @@ 4.4 require('babel/register') 4.5 var webpack = require('webpack') 4.6 -var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js') 4.7 var ExtractTextPlugin = require('extract-text-webpack-plugin') 4.8 var path = require('path') 4.9 var neat = require('node-neat').includePaths 4.10 @@ -8,8 +7,8 @@ 4.11 4.12 module.exports = function () { 4.13 var isDev = env !== 'production' 4.14 - var cssLoader = isDev ? 'css-loader?sourceMap' : 'css-loader' 4.15 - var sassLoader = isDev ? 'sass-loader?sourceMap' : 'sass-loader' 4.16 + var cssLoader = isDev ? 'css-loader?sourceMap' : 'css-loader?sourceMap' 4.17 + var sassLoader = isDev ? 'sass-loader?sourceMap' : 'sass-loader?sourceMap' 4.18 var bourbonPaths = neat.map(function(p) { 4.19 return "includePaths[]=" + p 4.20 }).join("&") 4.21 @@ -37,8 +36,9 @@ 4.22 resolve: { 4.23 extensions: ['', '.js', '.jsx', '.scss'] 4.24 }, 4.25 - plugins: [commonsPlugin, new ExtractTextPlugin("main.css")], 4.26 + plugins: [new ExtractTextPlugin("main.css")], 4.27 modulesDirectoires: ["node_modules"], 4.28 + devtool: 'source-map', 4.29 } 4.30 if (isDev) { 4.31 manifest.host = '0.0.0.0' 4.32 @@ -76,7 +76,6 @@ 4.33 output: { 4.34 comments: false 4.35 }, 4.36 - sourceMap: false 4.37 }), 4.38 new webpack.DefinePlugin({ 4.39 'process.env': {NODE_ENV: JSON.stringify('production')}