-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
77 lines (64 loc) · 1.76 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
76
77
import svgLoader from 'vite-svg-loader'
import tailwindTypography from '@tailwindcss/typography'
import { copyManifestFromNodeModulesCacheIfAvailable, loadManifest } from './utils/server/manifest'
const SITE_URL = 'https://www.d2arsenal.com'
const GTAG_ID = 'G-SF9MC2HVRE'
export default defineNuxtConfig({
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss', '@vueuse/nuxt', '@nuxt/icon'],
runtimeConfig: {
public: {
siteUrl: SITE_URL,
gtagId: GTAG_ID,
},
},
app: {
pageTransition: false,
layoutTransition: false,
},
nitro: {
prerender: {
routes: ['/', '/donate/', '/sitemap.xml'],
},
},
experimental: {
payloadExtraction: true,
},
hooks: {
'nitro:build:before': async () => {
// eslint-disable-next-line n/prefer-global/process
await copyManifestFromNodeModulesCacheIfAvailable(Boolean(process.env.INCOMING_HOOK_BODY))
// eslint-disable-next-line no-console
console.log('preloading manifest')
await loadManifest(true)
// eslint-disable-next-line no-console
console.log('Successfully preloaded manifest')
},
},
typescript: {
strict: true,
},
build: {
transpile: ['@headlessui/vue'],
},
vite: {
plugins: [svgLoader()]
},
tailwindcss: {
config: {
plugins: [tailwindTypography],
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
},
},
},
},
},
routeRules: {
'/en/weapons/**': { static: true },
'/discord/': { redirect: { to: 'https://discord.gg/vagYTbGHud', statusCode: 301 } },
'/twitter/': { redirect: { to: 'https://twitter.com/D2Arsenal', statusCode: 301 } },
},
compatibilityDate: '2024-04-03',
})