-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
41 lines (40 loc) · 1.43 KB
/
webpack.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
module.exports = env => {
return {
entry: {worker: ['./src/Worker.fsproj']},
target: 'webworker',
output: {
path: __dirname + '/worker',
},
mode: "production",
resolve: {
// See https://github.com/fable-compiler/Fable/issues/1490
symlinks: false
},
plugins: [ ],
module: {
rules: [
// - fable-loader: transforms F# into JS
{
test: /\.fs(x|proj)?$/,
use: {
loader: "fable-loader",
options: {
babel: {
// More info at https://github.com/babel/babel/blob/master/packages/babel-preset-env/README.md
presets: [
["@babel/preset-env", {
"modules": false,
"useBuiltIns": false,
"loose": true,
// Use babel-preset-env to generate JS compatible with latest Chrome V8
"targets": "last 2 Chrome versions"}
]
]
}
}
}
}
]
}
}
}