insomnia/webpack/webpack.config.electron.babel.js

28 lines
566 B
JavaScript
Raw Normal View History

const path = require('path');
const productionConfig = require('./webpack.config.production.babel');
const output = {
libraryTarget: 'commonjs2'
};
if (process.env.NODE_ENV === 'development') {
output.path = path.join(__dirname, '../app');
output.filename = 'main.tmp.js';
} else {
output.path = path.join(__dirname, '../build');
output.filename = 'main.js';
}
module.exports = {
...productionConfig,
entry: [
2016-11-10 02:53:06 +00:00
'./main.development.js'
],
output: output,
node: {
__dirname: false,
__filename: false
},
target: 'electron-main'
};