12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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/, ""),
- // },
- // },
- // host:'0.0.0.0'
- // },
- build: {
- rollupOptions: {
- output: {
- manualChunks: {
- vue: ['vue'],
- 'vue-router': ['vue-router']
- }
- }
- }
- },
- css:{
- preprocessorOptions:{
- less:{
- modifyVars: {},
- javascriptEnabled: true
- }
- }
- }
- })
|