aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-02-09 13:02:47 +0100
committerZog2018-02-09 13:02:47 +0100
commit00d6a76a72ddf2393b69e0c99ed8225806da5fd1 (patch)
tree67933aaded7db1ea3a0682e88af5be55a5203751
parenta68053c85fdb55e43fdf1ae7d9aba95e31a148bb (diff)
downloadchouette-core-00d6a76a72ddf2393b69e0c99ed8225806da5fd1.tar.bz2
Refs #5486@1h; Use minified version of React./Redux in production5486-fix-react-warnings
-rw-r--r--config/deploy.rb3
-rw-r--r--config/webpack/production.js5
2 files changed, 7 insertions, 1 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
index 9be023adc..c36b8e52f 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -13,7 +13,8 @@ set :group_writable, true
set :bundle_cmd, "/var/lib/gems/#{ruby_version}/bin/bundle"
set :rake, "#{bundle_cmd} exec rake"
set :default_environment, {
- 'PATH' => "/var/lib/gems/#{ruby_version}/bin:$PATH"
+ 'PATH' => "/var/lib/gems/#{ruby_version}/bin:$PATH",
+ 'NODE_ENV' => "production"
}
set :keep_releases, -> { fetch(:kept_releases, 5) }
diff --git a/config/webpack/production.js b/config/webpack/production.js
index 82478b156..8e30c09ea 100644
--- a/config/webpack/production.js
+++ b/config/webpack/production.js
@@ -2,6 +2,11 @@ const environment = require('./environment')
const webpack = require('webpack')
const UglifyJsPlugin = require('uglify-js')
+let plugin = new webpack.EnvironmentPlugin({
+ NODE_ENV: 'production'
+})
+
+environment.plugins.append('EnvironmentPlugin', plugin)
environment.plugins.append(
'UglifyJs',
new webpack.optimize.UglifyJsPlugin({