     new webpack.optimize.UglifyJsPlugin()
   )
 
+  # Don't use react-hot-loader for the production build.
+  config.module.loaders[1] =
+    { test: /\.cjsx$/, loaders: ['coffee', 'cjsx']}
+
   # Run webpack.
   webpack config, (err, stats) ->
     throw new gutil.PluginError("webpack:build", err)  if err

gulp.task "webpack:build", (callback) ->

  # Modify some webpack config options.
  config = Object.create(webpackConfig)
  config.plugins = config.plugins.concat(
    new webpack.DefinePlugin(
      # This has effect on the react lib size.

    callback()
    return

# Modify some webpack config options.
devConfig = _.extend {}, webpackConfig
devConfig.devtool = "sourcemap"
devConfig.debug = true

