| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 | import { defineConfig } from 'vite'import vue from '@vitejs/plugin-vue'import { resolve } from 'path'export default defineConfig({  base: process.env.NODE_ENV === 'production' ? './' : '/',  plugins: [vue()],  resolve: {    alias: {      '@': resolve(__dirname, 'src')    }  },  //正式地址  // define: {  //   'process.env': {  //     'BASE_API':"https://cucu.cnyunl.com:8079",  //     'BASE_WS':"wss://cucu.cnyunl.com:8079/"   //   }  // },  // 测试地址  define: {    'process.env': {      'BASE_API':"http://61.164.207.46:8200",      'BASE_WS':"ws://61.164.207.46:8200/"    }  },  server: {    proxy: {      "/api": {        target: "http://61.164.207.46:8200/",        // target: "https://cucu.cnyunl.com:8079/",        ws: true,        changeOrigin: true,        rewrite: (path) => path.replace(/^\/api/, ""),      },    },  },  build: {    rollupOptions: {      output: {        manualChunks: {          vue: ['vue'],          'vue-router': ['vue-router']        }      }    }  },    css:{    preprocessorOptions:{      less:{        modifyVars: {},        javascriptEnabled: true      }    }  }})// ^3.2.15
 |