tuanshiwei-web/nuxt.config.ts

77 lines
1.4 KiB
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
import { defineNuxtConfig } from 'nuxt/config'
export default defineNuxtConfig({
runtimeConfig: {
public: {
cdnDomain: 'https://cdn.web.0rui.cn'
}
},
app: {
baseURL:'/web/',
},
nitro: {
routeRules: {
'/**': { trailingSlash: false }
}
},
router: {
// extendRoutes(routes, resolve) {
// routes.push({
// name: 'index_info',
// path: '/params/:param1', // * 表示可选的多个参数
// component: resolve(__dirname, 'pages/index_info.vue')
// });
// }
},
// 设置为false以启用客户端渲染适合静态生成
ssr: false,
// 静态生成配置
generate: {
routes: [
'/',
'/aboutUs',
'/proServices',
'/proServices_con',
'/societyDuty',
'/societyDutyNew',
'/concatUs',
'/customerReviews'
]
},
css: [
'swiper/css',
'swiper/css/mousewheel',
'@/assets/css/common.scss'
],
devtools: { enabled: true },
postcss: {
plugins: {
autoprefixer: {},
tailwindcss: {},
},
},
modules: ['@pinia/nuxt', 'nuxt-icons'],
vite: {
server: {
proxy: {
'/api': {
target: "https://tsw.hschool.com.cn/api",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
}
}
}
},
compatibilityDate: '2025-05-29'
})