12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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']
- mode: 'hash'
- },
- build: {
- publicPath: '/'
- },
- nitro: {
- output: {
- publicDir: "dist",
- staticDir: "static"
- }
- },
- server: {
- port: 3000,
- host: 'localhost'
- },
- 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": ""
- }
- },
- },
- })
|