mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 19:01:54 +02:00
Define NODE_ENV to use the production build of React on slatejs.org (#1939)
This commit is contained in:
committed by
Ian Storm Taylor
parent
a698d4a74e
commit
001460fa52
@@ -6,6 +6,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
const DefinePlugin = webpack.DefinePlugin
|
||||
const NamedModulesPlugin = webpack.NamedModulesPlugin
|
||||
const HotModuleReplacementPlugin = webpack.HotModuleReplacementPlugin
|
||||
const IS_PROD = process.env.NODE_ENV === 'production'
|
||||
@@ -57,6 +58,11 @@ const config = {
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify(
|
||||
IS_PROD ? 'production' : 'development'
|
||||
),
|
||||
}),
|
||||
new ExtractTextPlugin('[name]-[contenthash].css'),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Slate',
|
||||
|
Reference in New Issue
Block a user