2019-08-09 14:45:38 -04:00
|
|
|
const path = require('path');
|
|
|
|
|
2019-08-23 14:31:50 -04:00
|
|
|
const web = {
|
2019-08-09 14:45:38 -04:00
|
|
|
target: 'web',
|
2019-08-23 14:31:50 -04:00
|
|
|
entry: path.join(__dirname, "dist/index.js"),
|
2019-08-21 12:05:34 -04:00
|
|
|
externals: ['electron'],
|
2019-08-09 14:45:38 -04:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, "dist"),
|
|
|
|
filename: 'browser.js',
|
|
|
|
library: 'phoenix',
|
2019-08-19 15:28:43 -04:00
|
|
|
libraryTarget: 'commonjs2'
|
2019-08-09 14:45:38 -04:00
|
|
|
},
|
|
|
|
node: {
|
|
|
|
fs: 'empty',
|
2019-08-23 14:31:50 -04:00
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
usedExports: true
|
2019-08-09 14:45:38 -04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-08-23 14:31:50 -04:00
|
|
|
const node = {
|
2019-08-09 14:45:38 -04:00
|
|
|
target: "node",
|
2019-08-21 12:05:34 -04:00
|
|
|
externals: ['electron'],
|
2019-08-23 14:31:50 -04:00
|
|
|
entry: path.join(__dirname, "dist/eventSyncer.js"),
|
2019-08-09 14:45:38 -04:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, "dist"),
|
|
|
|
filename: "node.js",
|
|
|
|
library: 'phoenix',
|
|
|
|
libraryTarget: 'commonjs2',
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-08-23 14:31:50 -04:00
|
|
|
module.exports = {
|
|
|
|
node,
|
|
|
|
web
|
|
|
|
};
|