mirror of
https://github.com/PlayEdu/PlayEdu
synced 2026-01-01 16:49:30 +08:00
引入前端界面
This commit is contained in:
25
playedu-h5/vite.config.ts
Normal file
25
playedu-h5/vite.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
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",
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
legacy({
|
||||
targets: ["chrome 52"],
|
||||
additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
|
||||
renderLegacyChunks: true,
|
||||
modernPolyfills: true,
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
plugins: [gzipPlugin()],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user