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/" // } // }, // server: { // proxy: { // "/api": { // target: "https://cucu.cnyunl.com:8079/", // ws: true, // changeOrigin: true, // rewrite: (path) => path.replace(/^\/api/, ""), // }, // }, // }, define: { 'process.env': { 'BASE_API':"http://61.164.207.46:8200/" } }, server: { proxy: { "/api": { target: "http://61.164.207.46:8200/", 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 } } } })