ducky/web

Paddy 2015-07-07 Parent:b9d0efb44eaa

16:5d47855181e1 Go to Latest

ducky/web/webpack.config.js

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".

History
     1.1 --- a/webpack.config.js	Fri Jul 03 20:00:45 2015 -0400
     1.2 +++ b/webpack.config.js	Tue Jul 07 21:16:30 2015 -0400
     1.3 @@ -1,6 +1,5 @@
     1.4  require('babel/register')
     1.5  var webpack = require('webpack')
     1.6 -var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js')
     1.7  var ExtractTextPlugin = require('extract-text-webpack-plugin')
     1.8  var path = require('path')
     1.9  var neat = require('node-neat').includePaths
    1.10 @@ -8,8 +7,8 @@
    1.11  
    1.12  module.exports = function () {
    1.13    var isDev = env !== 'production'
    1.14 -  var cssLoader = isDev ? 'css-loader?sourceMap' : 'css-loader'
    1.15 -  var sassLoader = isDev ? 'sass-loader?sourceMap' : 'sass-loader'
    1.16 +  var cssLoader = isDev ? 'css-loader?sourceMap' : 'css-loader?sourceMap'
    1.17 +  var sassLoader = isDev ? 'sass-loader?sourceMap' : 'sass-loader?sourceMap'
    1.18    var bourbonPaths = neat.map(function(p) {
    1.19      return "includePaths[]=" + p
    1.20    }).join("&")
    1.21 @@ -37,8 +36,9 @@
    1.22      resolve: {
    1.23        extensions: ['', '.js', '.jsx', '.scss']
    1.24      },
    1.25 -    plugins: [commonsPlugin, new ExtractTextPlugin("main.css")],
    1.26 +    plugins: [new ExtractTextPlugin("main.css")],
    1.27      modulesDirectoires: ["node_modules"],
    1.28 +    devtool: 'source-map',
    1.29    }
    1.30    if (isDev) {
    1.31      manifest.host = '0.0.0.0'
    1.32 @@ -76,7 +76,6 @@
    1.33          output: {
    1.34            comments: false
    1.35          },
    1.36 -        sourceMap: false
    1.37        }),
    1.38        new webpack.DefinePlugin({
    1.39          'process.env': {NODE_ENV: JSON.stringify('production')}