12345678910111213141516171819202122232425262728293031323334 |
- import { fileURLToPath, URL } from 'node:url'
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import vueDevTools from 'vite-plugin-vue-devtools'
- // https://vite.dev/config/
- export default defineConfig({
- plugins: [
- vue(),
- vueDevTools(),
- ],
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- },
- },
- server: {
- // proxy: {
- // '/api': {
- // target: 'http://47.119.159.155:7687',
- // changeOrigin: true,
- // rewrite: (path) => path.replace(/^\/api/, '')
- // }
- // }
- proxy: {
- '/api': {
- target: 'http://api.csqionghua.com/live_data.php',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- }
- }
- }
- })
|