mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
24 lines
468 B
JavaScript
24 lines
468 B
JavaScript
const electronPublicApi = ['electron'];
|
|
|
|
const nodeModules = {};
|
|
electronPublicApi.forEach((apiString) => {
|
|
nodeModules[apiString] = `commonjs ${apiString}`;
|
|
});
|
|
|
|
module.exports = {
|
|
target: 'node',
|
|
output: {
|
|
filename: 'main.js',
|
|
},
|
|
node: {
|
|
global: false,
|
|
__dirname: false,
|
|
},
|
|
externals: nodeModules,
|
|
module: {
|
|
rules: [{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }],
|
|
},
|
|
devtool: 'source-map',
|
|
mode: 'none',
|
|
};
|