diff options
| -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 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({ |
