X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=webpack.config.js;h=a39832fb77341303be019c9c88d470cdcafa2877;hb=2e2da2be94720a739c595ec179a7ed49480ce753;hp=11b9069d132507f400d14eb8d674877513c270ad;hpb=c194f84cab66fa6e18b78c32f9cdf2bddf8d1e68;p=github%2Ffretlink%2Fpurs-loader.git 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'