From 0e1221d7b15e578d5e9146b01e11a24007d4ba9b Mon Sep 17 00:00:00 2001 From: eric thul Date: Mon, 6 Jul 2015 23:49:47 -0400 Subject: Generate .psci file Resolves #11 --- webpack.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index 11b9069..a39832f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,6 +4,8 @@ var path = require('path'); var webpack = require('webpack'); +var packageJson = require('./package.json'); + var noErrorsPlugin = webpack.NoErrorsPlugin; var dedupePlugin = webpack.optimize.DedupePlugin; @@ -12,9 +14,10 @@ var config = { 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' -- cgit v1.2.3