Created
March 15, 2016 17:55
-
-
Save pkamenarsky/bd9f262841794de17b01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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/**/*.js']; | |
var modulesDirectories = [ | |
'node_modules', | |
'bower_components' | |
]; | |
var purescriptWebpackPlugin = new PurescriptWebpackPlugin({ | |
src: src, | |
ffi: ffi, | |
bundle: false, | |
psc: 'psa', | |
pscArgs: { | |
sourceMaps: true | |
} | |
}); | |
var config | |
= { entry: './src/webpack.js' | |
, debug: true | |
, devtool: 'source-map' | |
, output: { path: __dirname | |
, pathinfo: true | |
, filename: 'app.js' | |
} | |
, module: { loaders: [ { test: /\.purs$/ | |
, loader: 'purs-loader' | |
} | |
, { test: /\.js$/ | |
, loader: 'source-map-loader' | |
, exclude: /node_modules|bower_components/ | |
} | |
] | |
} | |
, resolve: { modulesDirectories: modulesDirectories | |
, extensions: [ '', '.js', '.purs'] | |
} | |
, plugins: [ purescriptWebpackPlugin ] | |
} | |
; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment