-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.ts
75 lines (73 loc) · 1.9 KB
/
nuxt.config.ts
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
const { __dirname } = createCommonJS(import.meta.url);
import { resolve } from "path";
import { createCommonJS } from "mlly";
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
modules: ["~/modules/sitemap"],
sitemap: {
hostname: "https://hh.gbdev.io",
},
runtimeConfig: {
public: {
BASE_API_URL: process.env.BASE_API_URL || "https://hh3.gbdev.io",
},
},
css: [
"primeflex/primeflex.css",
"primevue/resources/themes/saga-blue/theme.css",
"primevue/resources/primevue.css",
"primeicons/primeicons.css",
],
build: {
transpile: ["primevue"],
},
nitro: {
prerender: {
ignore: ["/games", "/demos", "/music", "/tools"],
},
},
hooks: {
// By default, we use "pages" routing, matching the paths under /pages
// Here we add some additional routes
"pages:extend"(pages) {
pages.push(
// /demos, /games and /gbcompo21 should just point to the games view. We'll change the api call there, based on the matched path.
{
name: "gbcompo21",
path: "/events/gbcompo21",
file: resolve(__dirname, "pages/games.vue"),
},
{
name: "gbajam22",
path: "/events/gbajam22",
file: resolve(__dirname, "pages/games.vue"),
},
{
name: "gba",
path: "/games/gba",
file: resolve(__dirname, "pages/games.vue"),
},
{
name: "demos",
path: "/demos",
redirect: "/search?typetag=demo",
},
{
name: "games",
path: "/games",
redirect: "/search?typetag=game",
},
{
name: "tools",
path: "/tools",
redirect: "/search?typetag=tool",
},
{
name: "music",
path: "/music",
redirect: "/search?typetag=music",
},
);
},
},
});