add IS_WEB global for electron build

This commit is contained in:
Sean Yesmunt 2019-03-18 17:44:47 -04:00
parent a1effefd64
commit 68c58457c9

View file

@ -3,6 +3,7 @@ const webpack = require('webpack');
const merge = require('webpack-merge');
const baseConfig = require('./webpack.base.config.js');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { DefinePlugin } = require('webpack');
const STATIC_ROOT = path.resolve(__dirname, 'static/');
const DIST_ROOT = path.resolve(__dirname, 'dist/');
@ -94,6 +95,11 @@ const renderConfig = {
},
],
},
plugins: [
new DefinePlugin({
IS_WEB: JSON.stringify(false),
}),
],
};
module.exports = [merge(baseConfig, mainConfig), merge(baseConfig, renderConfig)];