ing
This commit is contained in:
@@ -10,6 +10,7 @@ const channel = getReleaseChannel();
|
||||
const s = JSON.stringify;
|
||||
|
||||
function getReplacements() {
|
||||
console.log(`channel: ${channel}`);
|
||||
return {
|
||||
__DARWIN__: process.platform === 'darwin',
|
||||
__WIN32__: process.platform === 'win32',
|
||||
|
||||
@@ -22,7 +22,7 @@ module.exports = function () {
|
||||
let config = Object.assign({});
|
||||
config.target = 'electron-main';
|
||||
config.mode = PROD ? 'production' : 'development';
|
||||
config.devtool = PROD ? 'source-map' : 'cheap-module-source-map';
|
||||
config.devtool = PROD ? false : 'cheap-module-source-map';
|
||||
config.externals = [nodeExternals()];
|
||||
config.entry = {
|
||||
'index': root('src', 'electron', 'main.ts')
|
||||
|
||||
@@ -13,12 +13,11 @@ const PROD = EVENT.includes('prod');
|
||||
|
||||
module.exports = function (config) {
|
||||
config.target = 'electron-renderer';
|
||||
// config.output = {
|
||||
// path: PROD ? root('build', 'dist') : root('build', 'dev'),
|
||||
// filename: '[name].js',
|
||||
// sourceMapFilename: '[file].map',
|
||||
// };
|
||||
|
||||
config.output = {
|
||||
path: PROD ? root('build', 'dist') : root('build', 'dev'),
|
||||
filename: '[name].js',
|
||||
crossOriginLoading: false,
|
||||
};
|
||||
|
||||
config.plugins.push(
|
||||
new webpack.DefinePlugin(
|
||||
|
||||
Reference in New Issue
Block a user