32 lines
689 B
JavaScript
32 lines
689 B
JavaScript
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
|
|
}
|
|
}
|
|
}
|
|
});
|