mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-25 15:57:18 +00:00
Merge pull request #2416 from resin-io/enable-production-react
chore(webpack): Set NODE_ENV to production for React / WebPack
This commit is contained in:
commit
1fb420c2fc
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const webpack = require('webpack')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin')
|
const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin')
|
||||||
const nodeExternals = require('webpack-node-externals')
|
const nodeExternals = require('webpack-node-externals')
|
||||||
@ -89,6 +90,9 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
new SimpleProgressWebpackPlugin({
|
new SimpleProgressWebpackPlugin({
|
||||||
format: process.env.WEBPACK_PROGRESS || 'verbose'
|
format: process.env.WEBPACK_PROGRESS || 'verbose'
|
||||||
|
}),
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production')
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user