1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- export default defineNuxtConfig({
- taget: "static",
- compatibilityDate: '2024-04-03',
- devtools: { enabled: true },
- module: [
- '@nuxtjs/style-resources',
- '@element-plus/nuxt',
- "@gauseen/nuxt-proxy",
- '@pinia/nuxt',
- ],
- css: [
- '~/assets/css/global.css',
- '~/assets/css/font.css',
- 'element-plus/dist/index.css',
- 'element-plus/theme-chalk/display.css'
- ],
- router: {
- middleware: ['auth']
- },
- nitro: {
- output: {
- publicDir: "dist",
- staticDir: "static"
- }
- },
- plugins: [
- '@/plugins/element-plus',
- {
- src: '@/plugins/request',
- mode: 'client'
- }
- ],
- buildModules: [
- 'nuxt-vite'
- ],
- proxyTable: {
- // 代理
- "/test": {
- target: "http://192.168.1.114:9501",//测试服务器
- // target: "http://192.168.1.117:9501",//测试服务器
- // target: "http://192.168.x.xxx:8008",//xxx
- changeOrigin: true,
- pathRewrite: {
- "^/test": ""
- }
- },
- "/mock": {
- target: 'http://192.168.1.114:9501',
- // target: "http://192.168.1.117:9501",//测试服务器
- changeOrigin: true,
- pathRewrite: {
- "^/mock": ""
- }
- },
- },
- })
|