-
Notifications
You must be signed in to change notification settings - Fork 344
/
Copy pathnuxt.config.ts
92 lines (91 loc) · 2.37 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// https://nuxt.com/docs/api/configuration/nuxt-config
import runtimeConfig from "./runtimeConfig";
import { sentryVitePlugin } from "@sentry/vite-plugin";
import sitemap from "./sitemap";
export default defineNuxtConfig({
loglevel: process.env.NUXT_LOG_LEVEL || 'info',
devtools: {enabled: true},
css: ['~/scss/app.scss'],
modules: [
'@pinia/nuxt',
'@vueuse/nuxt',
'@vueuse/motion/nuxt',
'nuxt3-notifications',
'nuxt-simple-sitemap',
'@nuxt/image',
... process.env.NUXT_PUBLIC_GOOGLE_ANALYTICS_CODE ? ['nuxt-gtag'] : [],
],
build: {
transpile: ["vue-notion", "query-builder-vue-3","vue-signature-pad"],
},
postcss: {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {},
autoprefixer: {},
},
},
experimental: {
inlineRouteRules: true
},
sentry: {
dsn: process.env.NUXT_PUBLIC_SENTRY_DSN,
lazy: true,
},
gtag: {
id: process.env.NUXT_PUBLIC_GOOGLE_ANALYTICS_CODE,
},
components: [
{
path: '~/components/forms',
pathPrefix: false,
global: true,
},
{
path: '~/components/global',
pathPrefix: false,
},
{
path: '~/components/pages',
pathPrefix: false,
},
'~/components',
],
nitro: {
awsAmplify: {
imageOptimization: {
cacheControl: "public, max-age=600, immutable" // 10 minutes
},
imageSettings: {
formats: ['image/webp'],
dangerouslyAllowSVG: true,
}
}
},
image: runtimeConfig.public.useDummyImageProvider ? {
provider: 'dummy',
providers: {
dummy: {
provider: '~/lib/dummy-image-provider.js',
}
}
} :{
quality: 95,
format: 'webp',
domains: ['images.unsplash.com']
},
sourcemap: true,
vite: {
plugins: [
// Put the Sentry vite plugin after all other plugins
sentryVitePlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "opnform",
project: "opnform-vue",
}),
],
},
sitemap,
runtimeConfig
})