MyCrypto/webpack_config/webpack.electron-prod.js

29 lines
734 B
JavaScript
Raw Normal View History

'use strict';
const webpack = require('webpack');
const path = require('path');
const ClearDistPlugin = require('./plugins/clearDist');
const DelayPlugin = require('./plugins/delay');
const makeConfig = require('./makeConfig');
const electronConfig = require('./webpack.electron-dev.js');
const jsConfig = makeConfig({
isProduction: true,
isElectronBuild: true,
outputDir: 'electron-js'
});
// Redefine plugins with prod specific stuff
electronConfig.mode = 'production';
electronConfig.plugins = [
new ClearDistPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new DelayPlugin(500)
];
2018-04-27 20:49:17 +00:00
electronConfig.devtool = undefined;
module.exports = [electronConfig, jsConfig];