-
Notifications
You must be signed in to change notification settings - Fork 45
/
nuxt.config.ts
49 lines (48 loc) · 1.04 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
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
export default defineNuxtConfig({
runtimeConfig: {
replicateApiToken: process.env.NUXT_REPLICATE_API_TOKEN || ''
},
nitro: {
preset: 'vercel-edge'
},
sourcemap: {
server: false,
client: false
},
build: {
transpile: ['vuetify']
},
modules: [
(_options, nuxt) => {
nuxt.hooks.hook('vite:extendConfig', (config) => {
// @ts-expect-error
config.plugins.push(vuetify({ autoImport: true }))
})
}
],
vite: {
vue: {
template: {
transformAssetUrls
}
}
},
app: {
head: {
script: [
{
async: true,
src: `https://www.googletagmanager.com/gtag/js?id=${process.env.NUXT_GTAG_ID}`
},
{
children: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${process.env.NUXT_GTAG_ID}');`
}
]
}
}
})