svrjs-statistics-server-php/frontend/vite.config.js

33 lines
689 B
JavaScript
Raw Permalink Normal View History

2024-12-18 18:02:43 +01:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import legacy from "@vitejs/plugin-legacy";
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
legacy({
targets: ["firefox >= 52", "chrome >= 49", "safari >= 11", "edge >= 12"],
additionalLegacyPolyfills: ["unfetch/polyfill"]
})
],
build: {
outDir: "../dist",
emptyOutDir: false,
chunkSizeWarningLimit: 800
},
resolve: {
alias: {
"@": "/src"
}
},
server: {
proxy: {
"^/(?:(?!\\.php(?:$|[?#])).)+.php(?:$|[?#])": {
target: "http://localhost:8000",
changeOrigin: true
}
}
}
});