diff options
Diffstat (limited to 'example/webpack.config.js')
-rw-r--r-- | example/webpack.config.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/example/webpack.config.js b/example/webpack.config.js index f67e83a..9294904 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js | |||
@@ -1,14 +1,27 @@ | |||
1 | var path = require('path'); | 1 | var path = require('path'); |
2 | 2 | ||
3 | var srcs = ['src[]=bower_components/purescript-*/src/**/*.purs', 'src[]=src/**/*.purs']; | ||
4 | |||
5 | var ffis = ['ffi[]=bower_components/purescript-*/src/**/*.js']; | ||
6 | |||
7 | var output = 'output'; | ||
8 | |||
9 | var modulesDirectories = [ | ||
10 | 'node_modules', | ||
11 | 'bower_components/purescript-prelude/src', | ||
12 | output | ||
13 | ]; | ||
14 | |||
3 | var config | 15 | var config |
4 | = { entry: './src/entry' | 16 | = { entry: './src/entry' |
5 | , output: { path: __dirname | 17 | , output: { path: __dirname |
18 | , pathinfo: true | ||
6 | , filename: 'bundle.js' | 19 | , filename: 'bundle.js' |
7 | } | 20 | } |
8 | , module: { loaders: [ { test: /\.purs$/, loader: 'purs-loader?src[]=src' } ] } | 21 | , module: { loaders: [ { test: /\.purs$/ |
9 | , resolve: { modulesDirectories: [ 'node_modules', | 22 | , loader: 'purs-loader?output=' + output + '&' + srcs.concat(ffis).join('&') |
10 | 'output' | 23 | } ] } |
11 | ] | 24 | , resolve: { modulesDirectories: modulesDirectories |
12 | , extensions: ['', '.js', '.purs'] | 25 | , extensions: ['', '.js', '.purs'] |
13 | } | 26 | } |
14 | , resolveLoader: { root: path.join(__dirname, 'node_modules') } | 27 | , resolveLoader: { root: path.join(__dirname, 'node_modules') } |