subspace/webpack.common.js
Richard Ramos 3e7cdbcac1
test: graphql rxjs (#11)
* test: graphql
* fix: webpack
* fix: getENV
2019-08-22 11:25:26 -04:00

31 lines
625 B
JavaScript

const path = require('path');
const webConfig = {
target: 'web',
entry: path.join(__dirname, "src/index.js"),
externals: ['electron'],
output: {
path: path.resolve(__dirname, "dist"),
filename: 'browser.js',
library: 'phoenix',
libraryTarget: 'commonjs2'
},
node: {
fs: 'empty',
}
};
const nodeConfig = {
target: "node",
externals: ['electron'],
entry: path.join(__dirname, "src/eventSyncer.js"),
output: {
path: path.resolve(__dirname, "dist"),
filename: "node.js",
library: 'phoenix',
libraryTarget: 'commonjs2',
}
};
module.exports = [nodeConfig, webConfig];