vite.config.js
529 Bytes
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
base: '/iot/',
plugins: [
vue(),
],
server: {
proxy: {
'/api': {
target: 'http://182.127.106.19:81',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/iot-scheduler'),
},
},
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
})