Files
shop/nuxt.config.ts
T
libretech 61a74e649b
build / build (push) Successful in 1m38s
feat(selection): lock single-option boxes, drop the about link
Recovered work in progress that sat uncommitted since 2026-05: a
SelectionBox renders as a plain div instead of a NuxtLink when locked,
so a variant with only one choice reads as decided rather than
clickable, and it reports aria-checked in that state. useProductContent
gained the content lookups the details and index pages now use, the
cookie banner says Schließen instead of Akzeptieren, the Über uns
header entry is gone, and ProductCard's hover shadow no longer relies
on a short-circuit that could yield a non-array.
2026-09-23 22:09:52 +02:00

116 lines
3.1 KiB
TypeScript

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: "2025-07-15",
devtools: { enabled: true },
// Port configuration
devServer: {
port: 9999
},
// Modules
modules: ["@pinia/nuxt", "@nuxtjs/tailwindcss", "@nuxt/image", "@nuxtjs/sitemap"],
// Sitemap configuration
sitemap: {
// Disable auto-discovery features
autoLastmod: false,
discoverImages: false,
discoverVideos: false,
// Use only our custom source for URLs
sources: ["/api/__sitemap__/urls"],
// Exclude all auto-discovered routes - we handle all URLs in our custom endpoint
excludeAppSources: true
},
// Runtime config (environment variables)
// NUXT_ prefix is auto-mapped by Nuxt
runtimeConfig: {
// Server-only (private) - never exposed to client
shopApiToken: "", // NUXT_SHOP_API_TOKEN
cmsInternalUrl: "http://cms:5555", // NUXT_CMS_INTERNAL_URL - internal docker network URL
siteUrl: "https://muellerprints-paperwork.com", // NUXT_SITE_URL - for sitemap
// Public (client + server)
public: {
baseUrl: "", // NUXT_PUBLIC_BASE_URL
paypalClientId: "", // NUXT_PUBLIC_PAYPAL_CLIENT_ID
paymentEnvironment: "sandbox", // NUXT_PUBLIC_PAYMENT_ENVIRONMENT
umamiScriptUrl: "", // NUXT_PUBLIC_UMAMI_SCRIPT_URL
umamiWebsiteId: "" // NUXT_PUBLIC_UMAMI_WEBSITE_ID
}
},
// SSR + Hybrid Rendering
routeRules: {
// Cart & Checkout: Client-only (no SSR)
"/cart": { ssr: false },
"/checkout/**": { ssr: false },
// Local dev: proxy CMS media. In prod nginx routes /uploads → cms;
// without it the browser would hit the Nuxt origin and 404.
"/uploads/**": { proxy: "http://cms:5555/uploads/**" }
// All other pages use default SSR
},
// App config
app: {
head: {
htmlAttrs: { lang: "de" },
charset: "utf-8",
viewport: "width=device-width, initial-scale=1",
title: "MUELLERPRINTS - Handgefertigte Notizbücher aus Stuttgart",
meta: [{ name: "description", content: "Handgefertigte Notizbücher aus Stuttgart mit 100% Recyclingpapier" }],
link: [
{ rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png" },
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
{ rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: "" },
{ rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap" }
],
script: []
}
},
// TypeScript
typescript: {
strict: true
},
// Tailwind
tailwindcss: {
configPath: "tailwind.config.ts",
cssPath: "~/assets/css/main.css"
},
// Build
build: {
transpile: ["vue-markdown-render", "vue-strapi-blocks-renderer"]
},
// Vite configuration for optimization
vite: {
build: {
// Split chunks for better caching
rollupOptions: {
output: {
manualChunks: {
// Separate vendor chunks
"vue-vendor": ["vue", "vue-router"],
"carousel": ["vue3-carousel"],
"paypal": ["@paypal/paypal-js"]
}
}
}
},
// Optimize deps
optimizeDeps: {
include: ["vue", "vue-router"]
}
},
// Experimental features for better performance
experimental: {
// Enable payload extraction for smaller HTML
payloadExtraction: true
}
});