commit 00d58c46d1f603f36354c452643db6f3530cd991
parent 6878c79dd6974e6d4571601b3a00863b3a850211
Author: Siebe Hiemstra <siebe.hiemstra@bluemango.nl>
Date: Sat, 20 Feb 2016 13:28:09 +0100
Add process.env.BROWSER flag
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/webpack.config.js b/tools/webpack.config.js
@@ -120,7 +120,7 @@ const clientConfig = extend(true, {}, config, {
// http://webpack.github.io/docs/configuration.html#devtool
devtool: DEBUG ? 'cheap-module-eval-source-map' : false,
plugins: [
- new webpack.DefinePlugin(GLOBALS),
+ new webpack.DefinePlugin({ ...GLOBALS, 'process.env.BROWSER': '"true"' }),
new AssetsPlugin({
path: path.join(__dirname, '../build'),
filename: 'assets.js',
@@ -174,7 +174,7 @@ const serverConfig = extend(true, {}, config, {
},
devtool: 'source-map',
plugins: [
- new webpack.DefinePlugin(GLOBALS),
+ new webpack.DefinePlugin({ ...GLOBALS, 'process.env.BROWSER': '"false"' }),
new webpack.BannerPlugin('require("source-map-support").install();',
{ raw: true, entryOnly: false }),
],