subspace/webpack.common.js

37 lines
654 B
JavaScript
Raw Normal View History

const path = require('path');
2019-08-23 18:31:50 +00:00
const web = {
target: 'web',
2019-08-23 18:31:50 +00:00
entry: path.join(__dirname, "dist/index.js"),
2019-08-21 16:05:34 +00:00
externals: ['electron'],
output: {
path: path.resolve(__dirname, "dist"),
filename: 'browser.js',
library: 'phoenix',
libraryTarget: 'commonjs2'
},
node: {
fs: 'empty',
2019-08-23 18:31:50 +00:00
},
optimization: {
usedExports: true
}
};
2019-08-23 18:31:50 +00:00
const node = {
target: "node",
2019-08-21 16:05:34 +00:00
externals: ['electron'],
2019-08-23 18:31:50 +00:00
entry: path.join(__dirname, "dist/eventSyncer.js"),
output: {
path: path.resolve(__dirname, "dist"),
filename: "node.js",
library: 'phoenix',
libraryTarget: 'commonjs2',
}
};
2019-08-23 18:31:50 +00:00
module.exports = {
node,
web
};