mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-06 14:54:03 +08:00
27 lines
575 B
TypeScript
27 lines
575 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
import gzipPlugin from "rollup-plugin-gzip";
|
|
import legacy from "@vitejs/plugin-legacy";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 9797,
|
|
},
|
|
plugins: [
|
|
react(),
|
|
legacy({
|
|
targets: ["chrome 52"],
|
|
additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
|
|
renderLegacyChunks: true,
|
|
modernPolyfills: true,
|
|
}),
|
|
],
|
|
build: {
|
|
rollupOptions: {
|
|
plugins: [gzipPlugin()],
|
|
},
|
|
},
|
|
});
|