50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
export default defineNuxtConfig({
|
|
modules: ["@pinia/nuxt", "@nuxtjs/i18n", "@vmall/ui/nuxt"],
|
|
css: ["@vmall/shared/theme.css"],
|
|
vite: { plugins: [tailwindcss()] },
|
|
devtools: { enabled: false },
|
|
devServer: { port: 3000 },
|
|
runtimeConfig: {
|
|
public: {
|
|
apiBase: "http://localhost:8080/api",
|
|
// Domains served by the live backend; every other domain stays on the
|
|
// fixed-data adapter. Override with NUXT_PUBLIC_LIVE_DOMAINS='["catalog"]'.
|
|
// See openspec/changes/replace-mock-api-wave-1/design.md and waves 2-3.
|
|
liveDomains: [
|
|
"catalog",
|
|
"currency",
|
|
"content",
|
|
"shops",
|
|
"brands",
|
|
"auth",
|
|
"account",
|
|
"cart",
|
|
"orders",
|
|
"shipments",
|
|
"invoices",
|
|
"addresses",
|
|
"coupons",
|
|
"points",
|
|
"flashSales",
|
|
"groupBuying",
|
|
"favorites",
|
|
"aftersales",
|
|
],
|
|
appName: "mall",
|
|
},
|
|
},
|
|
i18n: {
|
|
strategy: "no_prefix",
|
|
defaultLocale: "en",
|
|
locales: [
|
|
{ code: "en", name: "English" },
|
|
{ code: "zh", name: "中文" },
|
|
],
|
|
vueI18n: "../i18n.config.ts",
|
|
bundle: { optimizeTranslationDirective: false },
|
|
},
|
|
compatibilityDate: "2025-01-01",
|
|
});
|