aboutsummaryrefslogblamecommitdiffhomepage
path: root/example/webpack.config.js
blob: 602de8483fe63794b82d8696f905096bfccb6357 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
             
 
                                                                   
 
                                                                           
 
                                                                          


                          
                    

  


                               
                              

                                     
                                            
                                                  
                                
                                                                                            
                                                                    



                        
'use strict';

var PurescriptWebpackPlugin = require('purescript-webpack-plugin');

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

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

var modulesDirectories = [
  'node_modules',
  'bower_components'
];

var config
  = { entry: './src/entry'
    , output: { path: __dirname
              , pathinfo: true
              , filename: 'bundle.js'
              }
    , module: { loaders: [ { test: /\.purs$/
                           , loader: 'purs-loader'
                           } ] }
    , resolve: { modulesDirectories: modulesDirectories, extensions: [ '', '.js', '.purs'] }
    , plugins: [ new PurescriptWebpackPlugin({src: src, ffi: ffi}) ]
    }
    ;

module.exports = config;