import { URL, fileURLToPath } from 'url' import Unocss from 'unocss/vite' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue({ reactivityTransform: true, }), Unocss(), ], resolve: { alias: { '@crami/http': fileURLToPath(new URL('../src', import.meta.url)), '~/': fileURLToPath(new URL('./src/', import.meta.url)), }, }, server: { proxy: { '/api': { target: 'http://10.0.59.229:7300/mock/622ff143ec91f63c580c0560', rewrite: (path) => { return path.replace(/^\/api/, '') }, }, }, }, })