-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
56 lines (49 loc) · 1.26 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
47
48
49
50
51
52
53
54
55
56
/*----------------------------------------------------------------
Resource: Vital.network
Script: webpack.config.js
Author: vStudio
Developer(s): Aviril, Mario, Tron
DOC: 22/07/2022
Desc: Webpack Confign
----------------------------------------------------------------*/
//////////////
// Imports //
//////////////
require("@vstudio/vital.kit")
const CPath = require("path")
const CPackage = require("./package.json")
//////////////
// Exports //
//////////////
const vIgnore = ["express", "compression", "cors", "busboy", "ws"]
vIgnore.forEach((i) => vKit.ignore.web[i] = false)
module.exports = [
// Front-End
{
target: "web",
mode: "production",
entry: {
app: ["./src/"]
},
output: {
path: CPath.resolve(__dirname, "build"),
filename: `${CPackage.name}-client.js`
},
resolve: {
alias: vKit.ignore.web
}
},
// Back-End
{
target: "node",
mode: "production",
entry: {
app: ["./src/"]
},
output: {
path: CPath.resolve(__dirname, "build"),
filename: `${CPackage.name}-server.js`
},
externals: [require("webpack-node-externals")()]
}
]