Skip to content

Commit

Permalink
Set production env variable for browser builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Sep 9, 2017
1 parent bbee417 commit 1e7c23a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webpack.production.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import ExtractTextPlugin from 'extract-text-webpack-plugin'
import config, { plugins } from './webpack.config.babel'

export const minifyPlugins = [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
comments: false
Expand All @@ -17,11 +22,6 @@ export default {
plugins: [
...plugins,
...minifyPlugins,
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new ExtractTextPlugin({ filename: 'app.css' })
]
}

0 comments on commit 1e7c23a

Please sign in to comment.