1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 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':"https://www.cnyunl.com",
- // 'BASE_WS':"wss://lsa.cnyunl.com/"
- // }
- // },
- // 测试地址
- 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://www.cnyunl.com/",
- ws: true,
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, ""),
- },
- },
- host:'0.0.0.0'
- },
- build: {
- rollupOptions: {
- output: {
- manualChunks: {
- vue: ['vue'],
- 'vue-router': ['vue-router']
- }
- }
- }
- },
-
- css:{
- preprocessorOptions:{
- less:{
- modifyVars: {},
- javascriptEnabled: true
- }
- }
- }
- })
- // ^3.2.15
|