36 lines
865 B
TypeScript
36 lines
865 B
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import svgLoader from "vite-svg-loader";
|
|
|
|
export default defineNuxtConfig({
|
|
compatibilityDate: "2025-07-15",
|
|
devtools: { enabled: true },
|
|
|
|
app: {
|
|
pageTransition: {
|
|
name: "slide-left",
|
|
mode: "out-in"
|
|
}
|
|
},
|
|
|
|
css: ["~/assets/css/tailwind.css"],
|
|
|
|
vite: {
|
|
plugins: [tailwindcss(), svgLoader()]
|
|
},
|
|
|
|
modules: ["@pinia/nuxt", "@vueuse/nuxt", "@nuxt/eslint", "shadcn-nuxt"],
|
|
|
|
// 允许任意来源访问 /api/* 接口,供 OCS 油猴脚本跨域调用
|
|
routeRules: {
|
|
"/api/**": {
|
|
cors: true,
|
|
headers: {
|
|
"Access-Control-Allow-Origin": "*",
|
|
"Access-Control-Allow-Methods": "GET,POST,PUT,PATCH,DELETE,OPTIONS",
|
|
"Access-Control-Allow-Headers": "Content-Type,Authorization"
|
|
}
|
|
}
|
|
}
|
|
});
|