2017-03-03 01:44:07 +00:00
|
|
|
const path = require('path');
|
|
|
|
const productionConfig = require('./webpack.config.production.babel');
|
2016-11-10 00:01:10 +00:00
|
|
|
|
2017-03-03 01:44:07 +00:00
|
|
|
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 = {
|
2016-11-10 00:01:10 +00:00
|
|
|
...productionConfig,
|
|
|
|
entry: [
|
2016-11-10 02:53:06 +00:00
|
|
|
'./main.development.js'
|
2016-11-10 00:01:10 +00:00
|
|
|
],
|
2017-03-03 01:44:07 +00:00
|
|
|
output: output,
|
2016-11-10 00:01:10 +00:00
|
|
|
node: {
|
|
|
|
__dirname: false,
|
|
|
|
__filename: false
|
|
|
|
},
|
|
|
|
target: 'electron-main'
|
|
|
|
};
|