-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
113 lines (99 loc) · 2.26 KB
/
index.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import type { NuxtConfig } from '@nuxt/schema';
import { head } from './head';
const app: NuxtConfig['app'] = {
head,
pageTransition: false,
layoutTransition: false,
};
const build: NuxtConfig['build'] = {
analyze: true,
};
const components: NuxtConfig['components'] = false;
const css: NuxtConfig['css'] = [
'~/assets/css/fonts.css',
'~/assets/css/logo.css',
'~/assets/css/global.css',
];
const dev: NuxtConfig['dev'] = process.env.NODE_ENV !== 'production';
const debug: NuxtConfig['debug'] = process.env.NODE_ENV !== 'production';
const devtools: NuxtConfig['devtools'] = {
enabled: process.env.NODE_ENV !== 'production',
};
const devServer: NuxtConfig['devServer'] = {
port: Number(process.env.PORT) || 3000,
};
const experimental: NuxtConfig['experimental'] = {
asyncEntry: true,
externalVue: true,
configSchema: false,
emitRouteChunkError: 'automatic',
viewTransition: true,
componentIslands: true,
payloadExtraction: true,
typedPages: true,
};
const nitro: NuxtConfig['nitro'] = {
sourceMap: true,
future: {
nativeSWR: true,
},
prerender: {
crawlLinks: true,
},
rollupConfig: {
external: ['cloudflare:sockets'],
},
};
const postcss: NuxtConfig['postcss'] = {
plugins: {
'postcss-nesting': {},
'@unocss/postcss': {},
},
};
const plugins: NuxtConfig['plugins'] = [];
const routeRules: NuxtConfig['routeRules'] = {
'/': { prerender: true },
// Blog post generated on-demand once until next deploy
'/articles/**': { isr: true },
// API routes are not pre-rendered
'/api/**': { prerender: false },
};
const runtimeConfig: NuxtConfig['runtimeConfig'] = {
database: {
url: process.env.NUXT_DATABASE_URL,
},
oauth: {
github: {
clientId: process.env.NUXT_OAUTH_GITHUB_CLIENT_ID,
clientSecret: process.env.NUXT_OAUTH_GITHUB_CLIENT_SECRET,
},
},
public: {
appVersion: process.env.npm_package_version,
NUXT_ENV: 'development',
},
};
const ssr: NuxtConfig['ssr'] = true;
const typescript: NuxtConfig['typescript'] = {
strict: true,
shim: false,
};
export { modules } from './modules';
export {
app,
build,
components,
css,
debug,
dev,
devServer,
devtools,
experimental,
nitro,
plugins,
postcss,
routeRules,
runtimeConfig,
ssr,
typescript,
};