diff options
author | eric <thul.eric@gmail.com> | 2016-01-19 08:41:51 -0500 |
---|---|---|
committer | eric <thul.eric@gmail.com> | 2016-01-19 08:41:51 -0500 |
commit | 2ecf85616a2b56ec9ff675c8f45b7dcf5607fc86 (patch) | |
tree | f8ad39dc0d21ae4add8f2a3877edf24294d2910f /example/webpack.config.js | |
parent | 94cc1cdd03b9c2115813a698b1e4337bce894321 (diff) | |
parent | c01553307e6fcd0abada0b9b2f9ca8d6bb82b863 (diff) | |
download | purs-loader-2ecf85616a2b56ec9ff675c8f45b7dcf5607fc86.tar.gz purs-loader-2ecf85616a2b56ec9ff675c8f45b7dcf5607fc86.tar.zst purs-loader-2ecf85616a2b56ec9ff675c8f45b7dcf5607fc86.zip |
Merge pull request #34 from ethul/topic/psc-webpack-plugin
Topic/psc webpack plugin
Diffstat (limited to 'example/webpack.config.js')
-rw-r--r-- | example/webpack.config.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/example/webpack.config.js b/example/webpack.config.js index f1456d5..602de84 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js | |||
@@ -1,14 +1,14 @@ | |||
1 | var path = require('path'); | 1 | 'use strict'; |
2 | 2 | ||
3 | var srcs = ['src[]=bower_components/purescript-*/src/**/*.purs', 'src[]=src/**/*.purs']; | 3 | var PurescriptWebpackPlugin = require('purescript-webpack-plugin'); |
4 | 4 | ||
5 | var ffis = ['ffi[]=bower_components/purescript-*/src/**/*.js', 'ffi[]=src/**/*FFI.js']; | 5 | var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs']; |
6 | 6 | ||
7 | var output = 'output'; | 7 | var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*FFI.js']; |
8 | 8 | ||
9 | var modulesDirectories = [ | 9 | var modulesDirectories = [ |
10 | 'node_modules', | 10 | 'node_modules', |
11 | 'bower_components/purescript-prelude/src' | 11 | 'bower_components' |
12 | ]; | 12 | ]; |
13 | 13 | ||
14 | var config | 14 | var config |
@@ -18,12 +18,10 @@ var config | |||
18 | , filename: 'bundle.js' | 18 | , filename: 'bundle.js' |
19 | } | 19 | } |
20 | , module: { loaders: [ { test: /\.purs$/ | 20 | , module: { loaders: [ { test: /\.purs$/ |
21 | , loader: 'purs-loader?output=' + output + '&' + srcs.concat(ffis).join('&') | 21 | , loader: 'purs-loader' |
22 | } ] } | 22 | } ] } |
23 | , resolve: { modulesDirectories: modulesDirectories | 23 | , resolve: { modulesDirectories: modulesDirectories, extensions: [ '', '.js', '.purs'] } |
24 | , extensions: ['', '.js'] | 24 | , plugins: [ new PurescriptWebpackPlugin({src: src, ffi: ffi}) ] |
25 | } | ||
26 | , resolveLoader: { root: path.join(__dirname, 'node_modules') } | ||
27 | } | 25 | } |
28 | ; | 26 | ; |
29 | 27 | ||