add IS_WEB global for electron build
This commit is contained in:
parent
a1effefd64
commit
68c58457c9
1 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,7 @@ const webpack = require('webpack');
|
||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
const baseConfig = require('./webpack.base.config.js');
|
const baseConfig = require('./webpack.base.config.js');
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
const { DefinePlugin } = require('webpack');
|
||||||
|
|
||||||
const STATIC_ROOT = path.resolve(__dirname, 'static/');
|
const STATIC_ROOT = path.resolve(__dirname, 'static/');
|
||||||
const DIST_ROOT = path.resolve(__dirname, 'dist/');
|
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)];
|
module.exports = [merge(baseConfig, mainConfig), merge(baseConfig, renderConfig)];
|
||||||
|
|
Loading…
Reference in a new issue