simple-rbac/vite.config.ts
2025-02-14 23:59:01 +08:00

36 lines
765 B
TypeScript

import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueDevTools from 'vite-plugin-vue-devtools';
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
port: 3000,
host: '0.0.0.0',
strictPort: true,
open: true,
proxy: {
'/api': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
secure: false,
rewrite: (path) => path,
followRedirects: true, // Ensure 307 redirects are handled correctly
}
}
},
preview: {
port: 3000,
host: '0.0.0.0',
strictPort: true
}
});