diff options
author | eric thul <thul.eric@gmail.com> | 2015-07-05 10:13:47 -0400 |
---|---|---|
committer | eric thul <thul.eric@gmail.com> | 2015-07-06 23:53:01 -0400 |
commit | 1983893bf09a5c2ea1946e156be5da170075af7e (patch) | |
tree | f99bda0c0ff3c50356d8ab152336ba461c292494 /example/webpack.config.js | |
parent | 4558c6cf7879207166b1cc013e2e8112f558bb1d (diff) | |
download | purs-loader-1983893bf09a5c2ea1946e156be5da170075af7e.tar.gz purs-loader-1983893bf09a5c2ea1946e156be5da170075af7e.tar.zst purs-loader-1983893bf09a5c2ea1946e156be5da170075af7e.zip |
Updating for PureScript 0.7
Resolves #14
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') } |