兼容安卓钉钉

This commit is contained in:
xxx
2023-09-21 10:32:21 +08:00
parent 48e93202bf
commit eaee82649e
2 changed files with 12 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
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({
@@ -8,7 +9,15 @@ export default defineConfig({
host: "0.0.0.0",
port: 9797,
},
plugins: [react()],
plugins: [
react(),
legacy({
targets: ["chrome 52"],
additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
renderLegacyChunks: true,
modernPolyfills: true,
}),
],
build: {
rollupOptions: {
plugins: [gzipPlugin()],