-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxbundler.dev.js
More file actions
executable file
·77 lines (76 loc) · 1.8 KB
/
xbundler.dev.js
File metadata and controls
executable file
·77 lines (76 loc) · 1.8 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
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
const path = require("path");
module.exports = {
entry: process.env.NODE_BUNDLE_ENTRY_FILE,
output: {
path: path.resolve(__dirname, process.env.NODE_BUNDLE_OUTPUT_PATH),
filename: process.env.NODE_BUNDLE_OUTPUT_FILENAME,
publicPath: process.env.NODE_BUNDLE_OUTPUT_PUBLIC_PATH,
},
module: {
rules: [
{
test: /\.(j|t)s$/,
exclude: [/[\\/]node_modules[\\/]/],
loader: "builtin:swc-loader",
},
{
test: /\.(sass|scss)$/,
use: [
"style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
api: "modern-compiler",
sourceMap: true,
implementation: require.resolve("sass-embedded"),
quietDeps: true,
},
},
],
},
],
},
devServer: {
client: {
// webSocketUrl:
// "auto://" +
// process.env.NODE_DEVSERVER_HOST +
// ":" +
// process.env.NODE_DEVSERVER_PORT +
// "/ws",
overlay: true,
logging: "verbose",
progress: true,
reconnect: 4,
},
webSocketServer: {
type: "ws",
options: {
onConnection: (socket) => {
socket.on("error", (err) => {
console.error("[webpack-dev-server] WebSocket error:", err.message);
});
},
},
},
port: process.env.NODE_DEVSERVER_PORT,
host: process.env.NODE_DEVSERVER_HOST,
allowedHosts: "all",
static: process.env.NODE_DEVSERVER_STATIC,
proxy: [
{
context: ["/"],
target: process.env.NODE_DEVSERVER_PROXY_ROOT,
secure: false,
},
],
},
watch: true,
watchOptions: {
aggregateTimeout: 100,
poll: 100,
},
mode: "development",
devtool: "inline-source-map",
};