i-tools/nuxt.config.ts
2024-12-06 03:20:18 +08:00

54 lines
978 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-11-01',
devtools: { enabled: true },
nitro: {
preset: "./cloudflare-preset"
},
experimental: {
},
modules: [
"nitro-cloudflare-dev",
"@ant-design-vue/nuxt",
'@nuxtjs/tailwindcss'
],
routeRules: {
'/': { prerender: true },
'/**': { ssr: true },
// '/refresh': {
// cors: true,
// headers: {
// 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
// 'Access-Control-Allow-Headers': 'Content-Type'
// },
// redirect:{
// to:'/api/refresh',
// statusCode: 301
// }
// }
},
antd: {
},
vite: {
// 启用内联样式以避免闪烁
build: {
cssCodeSplit: false
}
},
// 或者如果想更精细地控制
features: {
// 启用内联样式
inlineStyles: true
},
css: [
'@/assets/css/main.scss'
]
})