]> git.immae.eu Git - github/fretlink/purs-loader.git/blobdiff - webpack.config.js
Fixing compiler warnings
[github/fretlink/purs-loader.git] / webpack.config.js
index 11b9069d132507f400d14eb8d674877513c270ad..a39832fb77341303be019c9c88d470cdcafa2877 100644 (file)
@@ -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'