2026-10-01 20:36:06 +03:30
|
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
|
|
|
|
|
|
const apiBase = process.env.NUXT_API_BASE || "http://127.0.0.1:3050";
|
|
|
|
|
|
|
|
|
|
const themeBootScript =
|
|
|
|
|
"(function(){try{var t=localStorage.getItem('montech_theme');" +
|
|
|
|
|
"var d=t==='dark'||(!t&&window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches);" +
|
|
|
|
|
"document.documentElement.classList.toggle('dark',d)}catch(e){}})()";
|
2026-09-30 18:42:28 +03:30
|
|
|
|
|
|
|
|
export default defineNuxtConfig({
|
|
|
|
|
compatibilityDate: "2025-01-01",
|
|
|
|
|
devtools: { enabled: false },
|
2026-10-01 20:36:06 +03:30
|
|
|
css: ["~/assets/css/fonts.css", "~/assets/css/main.css"],
|
|
|
|
|
components: [{ path: "~/components", pathPrefix: false }],
|
|
|
|
|
postcss: {
|
|
|
|
|
plugins: {
|
|
|
|
|
tailwindcss: {},
|
|
|
|
|
autoprefixer: {},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
alias: {
|
|
|
|
|
"@montech/shared": fileURLToPath(new URL("../../packages/shared/src/index.ts", import.meta.url)),
|
2026-09-30 18:42:28 +03:30
|
|
|
},
|
|
|
|
|
runtimeConfig: {
|
2026-10-01 20:36:06 +03:30
|
|
|
apiBase,
|
2026-09-30 18:42:28 +03:30
|
|
|
public: {
|
|
|
|
|
siteUrl: process.env.NUXT_PUBLIC_SITE_URL || "https://montech.ir",
|
|
|
|
|
apiBase: process.env.NUXT_PUBLIC_API_BASE || "",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
app: {
|
|
|
|
|
head: {
|
2026-10-01 20:36:06 +03:30
|
|
|
htmlAttrs: { lang: "fa", dir: "rtl", class: "scroll-smooth" },
|
|
|
|
|
bodyAttrs: {
|
|
|
|
|
class: "selection:bg-brand-600 selection:text-white antialiased hero-mesh dark:bg-[#070d19] dark:text-slate-100",
|
|
|
|
|
},
|
|
|
|
|
charset: "utf-8",
|
|
|
|
|
viewport: "width=device-width, initial-scale=1.0",
|
|
|
|
|
title: "منتک | هوشافزار منظر - پلتفرم راهکارهای نرمافزاری و هوش مصنوعی",
|
|
|
|
|
meta: [
|
|
|
|
|
{ name: "theme-color", content: "#0062f5" },
|
|
|
|
|
{ name: "format-detection", content: "telephone=no" },
|
|
|
|
|
],
|
|
|
|
|
link: [{ rel: "icon", type: "image/svg+xml", href: "/brand/logo.svg" }],
|
|
|
|
|
script: [{ innerHTML: themeBootScript, tagPosition: "head" }],
|
2026-09-30 18:42:28 +03:30
|
|
|
},
|
|
|
|
|
},
|
2026-10-01 20:36:06 +03:30
|
|
|
routeRules: {
|
|
|
|
|
"/": { swr: 30 },
|
|
|
|
|
"/blog": { swr: 120 },
|
|
|
|
|
"/blog/**": { swr: 120 },
|
|
|
|
|
"/gallery": { swr: 120 },
|
|
|
|
|
"/sitemap.xml": { swr: 3600 },
|
|
|
|
|
"/robots.txt": { swr: 86400 },
|
|
|
|
|
},
|
2026-09-30 18:42:28 +03:30
|
|
|
nitro: {
|
|
|
|
|
preset: "node-server",
|
2026-10-01 20:36:06 +03:30
|
|
|
compressPublicAssets: true,
|
|
|
|
|
devProxy: {
|
|
|
|
|
"/api": { target: `${apiBase}/api`, changeOrigin: true },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
experimental: {
|
|
|
|
|
payloadExtraction: false,
|
2026-09-30 18:42:28 +03:30
|
|
|
},
|
|
|
|
|
});
|