diff options
author | eric <thul.eric@gmail.com> | 2015-07-06 23:58:28 -0400 |
---|---|---|
committer | eric <thul.eric@gmail.com> | 2015-07-06 23:58:28 -0400 |
commit | 1d771135e825feaa1fba5177b60796578766b240 (patch) | |
tree | a063817b17ee2df146228cf66c4205c2d80f05be /webpack.config.js | |
parent | 4558c6cf7879207166b1cc013e2e8112f558bb1d (diff) | |
parent | 167c852f657b4746331c4f89e358a4a4876ced78 (diff) | |
download | purs-loader-1d771135e825feaa1fba5177b60796578766b240.tar.gz purs-loader-1d771135e825feaa1fba5177b60796578766b240.tar.zst purs-loader-1d771135e825feaa1fba5177b60796578766b240.zip |
Merge pull request #16 from ethul/topic/issue-11-and-14
Topic/issue 11 and 14
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 9 |
1 files changed, 6 insertions, 3 deletions
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'); | |||
4 | 4 | ||
5 | var webpack = require('webpack'); | 5 | var webpack = require('webpack'); |
6 | 6 | ||
7 | var packageJson = require('./package.json'); | ||
8 | |||
7 | var noErrorsPlugin = webpack.NoErrorsPlugin; | 9 | var noErrorsPlugin = webpack.NoErrorsPlugin; |
8 | 10 | ||
9 | var dedupePlugin = webpack.optimize.DedupePlugin; | 11 | var dedupePlugin = webpack.optimize.DedupePlugin; |
@@ -12,9 +14,10 @@ var config | |||
12 | = { cache: true | 14 | = { cache: true |
13 | , target: 'node' | 15 | , target: 'node' |
14 | , entry: { index: './entry' } | 16 | , entry: { index: './entry' } |
15 | , externals: { 'glob': 'commonjs glob' | 17 | , externals: Object.keys(packageJson.dependencies).reduce(function(b, a){ |
16 | , 'loader-utils': 'commonjs loader-utils' | 18 | b[a] = 'commonjs ' + a; |
17 | } | 19 | return b; |
20 | }, {}) | ||
18 | , output: { path: __dirname | 21 | , output: { path: __dirname |
19 | , filename: '[name].js' | 22 | , filename: '[name].js' |
20 | , libraryTarget: 'commonjs2' | 23 | , libraryTarget: 'commonjs2' |