feat: extract shop from mp/shop — initial libreshop/shop
Some checks failed
Build and publish / build (push) Failing after 19s
Some checks failed
Build and publish / build (push) Failing after 19s
Source moved verbatim from mp/shop/ on 2026-04-29; mp was the first concrete adapter consuming the libreshop toolkit. Builds and publishes git.librete.ch/libreshop/shop on every main / v* push via the standard .gitea/workflows/build.yml shared across libreshop components.
This commit is contained in:
112
nuxt.config.ts
Normal file
112
nuxt.config.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
// 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 }
|
||||
// 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
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user