var webpack = require('webpack');
+var packageJson = require('./package.json');
+
var noErrorsPlugin = webpack.NoErrorsPlugin;
var dedupePlugin = webpack.optimize.DedupePlugin;
= { cache: true
, target: 'node'
, entry: { index: './entry' }
- , externals: { 'glob': 'commonjs glob'
- , 'loader-utils': 'commonjs loader-utils'
- }
+ , externals: Object.keys(packageJson.dependencies).reduce(function(b, a){
+ b[a] = 'commonjs ' + a;
+ return b;
+ }, {})
, output: { path: __dirname
, filename: '[name].js'
, libraryTarget: 'commonjs2'