Skip to content

Instantly share code, notes, and snippets.

@rrichardson
Last active February 13, 2018 18:29
Show Gist options
  • Save rrichardson/b6099f302722fd1346c07d9a77522431 to your computer and use it in GitHub Desktop.
Save rrichardson/b6099f302722fd1346c07d9a77522431 to your computer and use it in GitHub Desktop.
const path = require('path');
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: {
index: './src/index.js',
cass: './src/cass.js',
api: './src/api.js',
},
target: 'node',
output: {
path: path.resolve(__dirname, 'lib'),
filename: '[name].js',
},
// externals: [nodeExternals({
// whitelist: ['proto'],
// })],
module: {
noParse: [/dtrace-provider$/, /safe-json-stringify$/, /mv/],
loaders: [{
test: /\.js$/,
exclude: function(modulePath) { return /node_modules/.test(modulePath) && !/node_modules\/redux-persist/.test(modulePath) && !/node_modules\/proto/.test(modulePath) && !/node_modules\/proto/.test(modulePath); },
loader: 'babel-loader',
}],
},
stats: {
colors: true
},
devtool: 'source-map'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment