| 1234567891011121314151617181920212223242526272829303132333435363738 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import vueJsx from '@vitejs/plugin-vue-jsx'
- const path = require('path')
- // https://vitejs.dev/config/
- export default defineConfig(({ command, mode }) => {
- console.log(command, mode)
- return {
- plugins: [vue(), vueJsx()],
- base: './',
- resolve: {
- alias: {
- '@': '/src'
- }
- },
- build: {
- outDir: `dist/${mode === 'production' ? 'merchant' : mode}`
- },
- optimizeDeps: { include: ['moment/locale/zh-cn'] },
- server: {
- proxy: {
- '/api': {
- // target: 'https://pdev.cleartv.cn/cticketmember/',
- target: 'https://potadev.cleartv.cn/',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- },
- '/tenant': {
- // target: 'https://pdev.cleartv.cn/cticketmember/',
- target: 'http://114.104.160.233:28002/',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- }
- }
- }
- }
- })
|