build(ui): adjust babel tagets

This commit is contained in:
Fu Diwei
2025-10-14 19:23:54 +08:00
parent 0904c6950c
commit a185de5e36
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -1,6 +1,7 @@
export const isBrowserHappy = () => {
try {
if (typeof Promise.withResolvers !== "function") return false;
if (typeof Promise.try !== "function") return false;
if (typeof CSS.supports !== "function") return false;
if (!CSS.supports("color", "oklch(0 0 0)")) return false;
} catch (_) {
+5
View File
@@ -56,6 +56,11 @@ export default defineConfig(({ mode }) => {
reactPlugin({}),
legacyPlugin({
targets: ["defaults", "not IE 11"],
modernTargets: "chrome>=111, firefox>=113, safari>=15.4",
polyfills: true,
modernPolyfills: true,
renderLegacyChunks: false,
renderModernChunks: true,
}),
tailwindcssPlugin(),
preserveFilesPlugin(["dist/.gitkeep"]),