diff --git a/webpack.electron.config.js b/webpack.electron.config.js index 4f32cc0da..8a43294ff 100644 --- a/webpack.electron.config.js +++ b/webpack.electron.config.js @@ -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)];