-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.dev-config.js
87 lines (76 loc) · 1.81 KB
/
webpack.dev-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
"use strict";
var webpack = require("webpack");
module.exports = {
context: __dirname + "/src",
entry: "./index.js",
output: {
path: __dirname + "/out",
filename: "index.js",
publicPath: "/"
},
resolve: {
modulesDirectories: [
"node_modules",
"node_modules/@purescript/prelude/src"
],
extensions: ["", ".js", ".elm", ".purs"]
},
resolveLoader: {
root: __dirname + "/node_modules"
},
module: {
preLoaders: [
{
test: /\.js$/,
loader: "jshint-loader",
exclude: [/elm-stuff/, /node_modules/]
}
],
loaders: [
{
test: /\.(appcache|html)$/,
loader: "file?name=[name].[ext]",
exclude: [/elm-stuff/, /node_modules/]
},
{
test: /\.css$/,
loader: "style-loader!css-loader",
exclude: [/elm-stuff/, /node_modules/]
},
{
test: /\.elm$/,
loader: "elm-webpack-loader?warn=true",
exclude: [/elm-stuff/, /node_modules/]
},
{
test: /\.(glsl|vert|frag)$/,
loader: "raw",
exclude: [/elm-stuff/, /node_modules/]
},
{
test: /\.js$/,
loader: "babel-loader",
exclude: [/elm-stuff/, /node_modules/]
},
{
test: /\.json$/,
loader: "json-loader",
exclude: [/elm-stuff/, /node_modules/]
},
{
test: /\.purs$/,
loader:
"purs-loader?output=purescript_modules&" + [
"src[]=node_modules/@purescript/prelude*/src/**/*.purs",
"src[]=src/**/*.purs",
"ffi[]=node_modules/@purescript/prelude*/src/**/*.js",
"ffi[]=src/**/*Foreign.js"
].join("&")
}
],
noParse: [/\.elm$/, /proj4\.js$/]
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin()
]
};