aboutsummaryrefslogblamecommitdiffhomepage
path: root/example/webpack.config.js
blob: 929490461820fc968f8a98146c2be0cc0c2b0a33 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

                           











                                                                                        


                               
                              

                                     



                                                                                                       






                                                                   
var path = require('path');

var srcs = ['src[]=bower_components/purescript-*/src/**/*.purs', 'src[]=src/**/*.purs'];

var ffis = ['ffi[]=bower_components/purescript-*/src/**/*.js'];

var output = 'output';

var modulesDirectories = [
  'node_modules',
  'bower_components/purescript-prelude/src',
  output
];

var config
  = { entry: './src/entry'
    , output: { path: __dirname
              , pathinfo: true
              , filename: 'bundle.js'
              }
    , module: { loaders: [ { test: /\.purs$/
                           , loader: 'purs-loader?output=' + output + '&' + srcs.concat(ffis).join('&')
                           } ] }
    , resolve: { modulesDirectories: modulesDirectories
               , extensions: ['', '.js', '.purs']
               }
    , resolveLoader: { root: path.join(__dirname, 'node_modules') }
    }
    ;

module.exports = config;