diff options
| author | Luc Donnet | 2018-02-20 10:39:46 +0100 |
|---|---|---|
| committer | GitHub | 2018-02-20 10:39:46 +0100 |
| commit | 6599a8d6a10e338fed38119115d12a3acb507e1b (patch) | |
| tree | a8670c0d984af10030d4b2131117daab55b4242a | |
| parent | d5ff5c82041a9807dbb8bb9a598b74e99ad538f9 (diff) | |
| parent | 00d6a76a72ddf2393b69e0c99ed8225806da5fd1 (diff) | |
| download | chouette-core-6599a8d6a10e338fed38119115d12a3acb507e1b.tar.bz2 | |
Merge pull request #297 from af83/5486-fix-react-warnings
5486 Use minified version of React/Redux in production
| -rw-r--r-- | config/deploy.rb | 3 | ||||
| -rw-r--r-- | config/webpack/production.js | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 136c60196..86339d137 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({ |
