2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-16 01:37:07 +00:00
nativefier/webpack.config.js

66 lines
1.4 KiB
JavaScript
Raw Normal View History

var electronPublicApi = [
'electron',
// for modules which use deprecated api
// modules are taken from https://github.com/atom/electron/tree/master/docs/api
'app',
'screen'
2016-01-23 03:47:28 +00:00
// Uncomment as needed if some external module uses the deprecated api
// 'accelerator',
// 'auto-updater',
// 'browser-window',
// 'chrome-command-line-switches',
// 'clipboard',
// 'content-tracing',
// 'crash-reporter',
// 'desktop-capturer',
// 'dialog',
// 'download-item',
// 'environment-variables',
// 'file-object',
// 'frameless-window',
// 'global-shortcut',
// 'ipc-main',
// 'ipc-renderer',
// 'menu-item',
// 'menu',
// 'native-image',
// 'power-monitor',
// 'power-save-blocker',
// 'process',
// 'protocol',
// 'remote',
// 'session',
// 'shell',
// 'synopsis',
// 'tray',
// 'web-contents',
// 'web-frame',
// 'web-view-tag',
// 'window-open'
];
2016-01-23 03:47:28 +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
},
externals: nodeModules,
module: {
loaders: [
2016-01-23 18:02:23 +00:00
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
]
},
devtool: 'source-map'
2016-01-23 03:47:28 +00:00
};