-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
33 lines (33 loc) · 863 Bytes
/
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
// https://nuxt.com/docs/api/configuration/nuxt-config
const INVALID_CHAR_REGEX = /[\x00-\x1F\x7F<>*#"{}|^[\]`;?:&=+$,]/g;
const DRIVE_LETTER_REGEX = /^[a-z]:/i;
export default defineNuxtConfig({
experimental: {
payloadExtraction: false,
},
nitro: {
preset: 'github-pages',
},
vite: {
build: {
rollupOptions: {
output: {
// https://github.com/rollup/rollup/blob/master/src/utils/sanitizeFileName.ts
sanitizeFileName(name) {
const match = DRIVE_LETTER_REGEX.exec(name);
const driveLetter = match ? match[0] : "";
return (
driveLetter +
name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, "")
);
},
},
},
},
},
runtimeConfig: {
public: {
GITHUB_AUTH: process.env.AUTH,
},
},
})