insomnia/webpack/webpack.config.electron.babel.js
Gregory Schier 1d45367aa1 Added eslint and fixed all problems (#101)
* Fixed duplication kve bug

* Added semistandard and updated code

* Actually got it working

* Even better

* I think it should work on Windows now
2017-03-03 12:09:08 -08:00

32 lines
668 B
JavaScript

const path = require('path');
const productionConfig = require('./webpack.config.production.babel');
let devtool;
const output = {
libraryTarget: 'commonjs2'
};
if (process.env.NODE_ENV === 'development') {
output.path = path.join(__dirname, '../app');
output.filename = 'main.min.js';
devtool = 'eval-source-map';
} else {
output.path = path.join(__dirname, '../build');
output.filename = 'main.js';
devtool = productionConfig.devtool;
}
module.exports = {
...productionConfig,
devtool: devtool,
entry: [
'./main.development.js'
],
output: output,
node: {
__dirname: false,
__filename: false
},
target: 'electron-main'
};