32 lines
661 B
TypeScript
32 lines
661 B
TypeScript
import { fileURLToPath, URL } from 'node:url';
|
|
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue()
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
},
|
|
server: {
|
|
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: {
|
|
host: '0.0.0.0',
|
|
strictPort: true
|
|
}
|
|
}); |