forked from fsprojects/FSharp.Data.Adaptive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
50 lines (46 loc) · 1.29 KB
/
webpack.config.js
File metadata and controls
50 lines (46 loc) · 1.29 KB
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
// Note this only includes basic configuration for development mode.
// For a more comprehensive configuration check:
// https://github.com/fable-compiler/webpack-config-template
const CopyPlugin = require('copy-webpack-plugin');
var path = require("path");
var production = process.argv.indexOf("-p") >= 0;
module.exports = {
context: path.join(__dirname, "./src/Demo/Fable/"),
mode: production ? "production" : "development",
entry: {
bundle: path.join(__dirname, "./src/Demo/Fable/Fable.fsproj"),
},
output: {
path: path.join(__dirname, "./bin/Fable"),
filename: "[name].js",
},
devServer: {
contentBase: path.join(__dirname, "./bin/Fable"),
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: ["ADAPTIVE_NO_TYPE_TESTS"]
}
}
}
]
},
plugins: [
new CopyPlugin([
{ from: path.join(__dirname, "./src/Demo/Fable/index.html"), to: path.join(__dirname, "./bin/Fable/index.html") }
])
]
}