-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
46 lines (42 loc) · 1.32 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
41
42
43
44
45
46
// Note this only includes basic configuration for development mode.
// For a more comprehensive configuration check:
// https://github.com/fable-compiler/webpack-config-template
var path = require("path");
var production = process.argv.indexOf("-p") >= 0;
module.exports = {
mode: production ? "production" : "development",
entry: {
demo: "./src/PointCloudViewer/Demo/Demo.fsproj",
worker: "./src/PointCloudViewer/Worker/Worker.fsproj",
importer: "./src/PointCloudViewer/Importer/Importer.fsproj"
},
output: {
path: path.join(__dirname, "./public"),
filename: "[name].js",
},
devServer: {
contentBase: "./public",
port: 8080,
host: '0.0.0.0',
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
},
clientLogLevel: 'error',
},
devtool: production ? false : "eval-source-map",
module: {
rules: [{
test: /\.fs(x|proj)?$/,
use: {
loader: "fable-loader",
options: {
define: ["FABLE_QUOTATIONS"],
cli: {
path: "./paket-files/fable-compiler/Fable/src/Fable.Cli"
}
}
}
}]
}
}