opnform-host-nginx/client/nuxt.config.ts

81 lines
2.1 KiB
TypeScript
Raw Normal View History

2023-12-09 15:47:03 +01:00
// https://nuxt.com/docs/api/configuration/nuxt-config
import runtimeConfig from "./runtimeConfig";
2024-01-17 19:32:17 +01:00
import { sentryVitePlugin } from "@sentry/vite-plugin";
2024-01-02 16:35:16 +01:00
import sitemap from "./sitemap";
2023-12-18 10:35:00 +01:00
2023-12-09 15:47:03 +01:00
export default defineNuxtConfig({
2024-01-06 15:26:18 +01:00
loglevel: process.env.NUXT_LOG_LEVEL || 'info',
2023-12-09 15:47:03 +01:00
devtools: {enabled: true},
css: ['~/scss/app.scss'],
modules: [
'@pinia/nuxt',
'@vueuse/nuxt',
'@vueuse/motion/nuxt',
2024-01-02 16:35:16 +01:00
'nuxt3-notifications',
'nuxt-simple-sitemap',
2024-01-06 00:31:28 +01:00
'@nuxt/image',
2024-01-14 20:52:14 +01:00
... process.env.NUXT_PUBLIC_GOOGLE_ANALYTICS_CODE ? ['nuxt-gtag'] : [],
2023-12-09 15:47:03 +01:00
],
2024-01-02 18:31:31 +01:00
build: {
2024-01-22 11:37:18 +01:00
transpile: ["vue-notion", "query-builder-vue-3","vue-signature-pad"],
2024-01-02 18:31:31 +01:00
},
2023-12-09 15:47:03 +01:00
postcss: {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {},
autoprefixer: {},
},
},
2024-01-02 16:35:16 +01:00
experimental: {
inlineRouteRules: true
},
2023-12-09 15:47:03 +01:00
sentry: {
2024-01-06 00:31:28 +01:00
dsn: process.env.NUXT_PUBLIC_SENTRY_DSN,
2024-01-13 18:17:24 +01:00
lazy: true,
2023-12-09 17:02:23 +01:00
},
2024-01-14 20:52:14 +01:00
gtag: {
id: process.env.NUXT_PUBLIC_GOOGLE_ANALYTICS_CODE,
},
2023-12-11 11:56:21 +01:00
components: [
{
path: '~/components/forms',
pathPrefix: false,
global: true,
2023-12-11 11:56:21 +01:00
},
{
path: '~/components/global',
pathPrefix: false,
},
2023-12-18 10:35:00 +01:00
{
path: '~/components/pages',
pathPrefix: false,
},
2023-12-11 11:56:21 +01:00
'~/components',
],
2024-01-08 19:58:07 +01:00
nitro: {
awsAmplify: {
imageOptimization: {
cacheControl: "public, max-age=600, immutable" // 10 minutes
},
2024-01-08 19:58:07 +01:00
imageSettings: {
formats: ['image/webp'],
2024-01-08 22:55:26 +01:00
dangerouslyAllowSVG: true,
2024-01-08 19:58:07 +01:00
}
}
2024-01-06 16:53:57 +01:00
},
2024-01-17 19:32:17 +01:00
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
2023-12-09 15:47:03 +01:00
})