title: How to run webpack compilation as part of CircleCI configuration
body: <p>I would like to save my uncompiled files to Github and have CircleCI run <code>webpack</code> later on to compile it. I can't seem to get this to work...</p>
  
  <pre><code>machine:
    node:
      version: 5.10.1
  
  dependencies:
    override:
      - npm install
      - npm install webpack -g
      - webpack
  
  test:
    override:
      - npm test
  
  deployment:
    staging:
      branch: master
      heroku:
        appname: heroku-app-123
  </code></pre>
  
  <p>Webpack does appear to have run, because I get the following output in CircleCI:</p>
  
  <p>Hash: db00c1</p>
  
  <pre><code>e4b7e0aa25c885
  Version: webpack 1.12.14
  Time: 10581ms
                Asset     Size  Chunks             Chunk Names
   /images/iphone.png  79.9 kB          [emitted]  
  /images/macbook.png   117 kB          [emitted]  
     /images/temp.png  16.1 kB          [emitted]  
            bundle.js  2.38 MB       0  [emitted]  main
            style.css  19.9 kB       0  [emitted]  main
     [0] multi main 52 bytes {0} [built]
  ...
  </code></pre>
  
  <p>But unfortunately, when it's deployed nothing is rendered, which tells me that webpack did not actually run. If I run the command <code>webpack</code> locally and push to Github, everything works fine, but I don't want to have to rely on me remembering to compile my app before I push. </p>
  
  <p>Is my webpack compilation step simply in the wrong place? How do I solve this?</p>
  
  <p>My <code>webpack.config.js</code> file looks like this:</p>
  
  <pre><code>var path = require('path')
  var webpack = require('webpack')
  var ExtractTextPlugin = require('extract-text-webpack-plugin')
  var autoprefixer = require('autoprefixer')
  
  module.exports = {
    devtool: 'eval',
    entry: [
      'webpack-dev-server/client?http://localhost:3000',
      'webpack/hot/only-dev-server',
      './app/index'
    ],
    output: {
      path: path.join(__dirname, 'static'),
      filename: 'bundle.js',
      publicPath: ''
    },
    plugins: [
      new ExtractTextPlugin('style.css', {
        allChunks: true
      }),
      new webpack.HotModuleReplacementPlugin()
    ],
    module: {
      loaders: [
        {
          test: /\.js$/,
          loaders: ['babel'],
          exclude: /node_modules/,
          include: path.join(__dirname, 'app')
        },
        {
          test: /\.scss$/,
          loader: ExtractTextPlugin.extract('style', 'css?modules&amp;importLoaders=1&amp;localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass')
        },
        {
          test: /\.(png|jpg)$/,
          loader: 'file?name=/images/[name].[ext]'
        }
      ]
    },
    resolve: {
      extensions: [ '', '.js', '.scss' ],
      modulesDirectories: [ 'app', 'node_modules' ]
    },
    postcss: [ autoprefixer({ browsers: ['last 2 versions'] }) ]
  }
  </code></pre>