2016-05-14 09:28:43 +00:00
|
|
|
var electronPublicApi = ['electron'];
|
2016-01-23 03:47:28 +00:00
|
|
|
|
2016-01-25 02:31:54 +00:00
|
|
|
var nodeModules = {};
|
|
|
|
electronPublicApi.forEach(apiString => {
|
|
|
|
nodeModules[apiString] = 'commonjs ' + apiString;
|
|
|
|
});
|
2016-01-23 03:47:28 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
target: 'node',
|
|
|
|
output: {
|
|
|
|
filename: 'main.js'
|
|
|
|
},
|
|
|
|
node: {
|
|
|
|
global: false,
|
|
|
|
__dirname: false
|
|
|
|
},
|
2016-01-23 04:42:09 +00:00
|
|
|
externals: nodeModules,
|
|
|
|
module: {
|
|
|
|
loaders: [
|
2016-01-23 18:02:23 +00:00
|
|
|
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
|
2016-01-23 04:42:09 +00:00
|
|
|
]
|
2016-01-24 13:20:29 +00:00
|
|
|
},
|
|
|
|
devtool: 'source-map'
|
2016-01-23 03:47:28 +00:00
|
|
|
};
|