-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
75 lines (70 loc) · 2.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import deadByDaylight from "dead-by-daylight"
import filterNil from "filter-nil"
import {paramCase} from "param-case"
import path from "path"
import {EnvironmentPlugin} from "webpack"
import configure from "webpack-config-jaid"
import itemTypes from "lib/itemTypes"
import pkg from "./package.json"
import formTypes from "./src/lib/formTypes"
const development = process.env.NODE_ENV !== "production"
const collectUrls = () => {
const urls = [
{
url: "perks/killer",
priority: 0.8,
},
{
url: "perks/survivor",
priority: 0.8,
},
{
url: "characters",
priority: 0.8,
},
"objects",
"about",
"perks/all",
"build",
"offerings/all",
"offerings/killer",
"offerings/survivor",
"offerings/killer-exclusive",
"offerings/survivor-exclusive",
...Object.keys(deadByDaylight.addOns).map(id => `add-on/${paramCase(id)}`),
...Object.keys(deadByDaylight.perks).map(id => `perk/${paramCase(id)}`),
...Object.keys(deadByDaylight.perks).map(id => `patches/for/${paramCase(id)}`),
...Object.keys(deadByDaylight.killers).map(id => `killer/${paramCase(id)}`),
...Object.keys(deadByDaylight.killers).map(id => `patches/for/${paramCase(id)}`),
...Object.keys(deadByDaylight.survivors).map(id => `survivor/${paramCase(id)}`),
...Object.keys(deadByDaylight.survivors).map(id => `patches/for/${paramCase(id)}`),
...Object.keys(deadByDaylight.patches).map(id => `patch/${paramCase(id)}`),
...Object.keys(deadByDaylight.offerings).map(id => `offering/${paramCase(id)}`),
...Object.keys(deadByDaylight.items).map(id => `item/${paramCase(id)}`),
...itemTypes.map(itemType => `items/${itemType.linkId}`),
...formTypes.map(formType => `build/${formType.linkId}`),
]
return filterNil(urls)
}
export default configure({
sitemap: {
paths: development ? null : collectUrls(),
},
googleAnalyticsTrackingId: "UA-154709538-3",
themeColor: "8b1b9d",
twitterAuthorHandle: "jaidchen",
twitterSiteHandle: "entitydotworks",
extra: {
resolve: {
alias: {
theme$: path.resolve(__dirname, "src", "theme.scss"),
},
},
plugins: [
new EnvironmentPlugin({
backendHost: "wss://server.entity.works",
version: pkg.version,
}),
],
},
})