fix: add promise.withResolvers supports

This commit is contained in:
wzp 2024-12-10 12:34:51 +08:00
parent 0e4abb39dd
commit f5e61ec9ff

View File

@ -11,9 +11,12 @@ import Components from 'unplugin-vue-components/vite';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
build: {
target: "es2015",
},
plugins: [
legacy({
targets: ['defaults'],
targets: ['defaults', 'Chrome >= 100', 'Edge >= 100', 'FireFox >= 110'],
polyfills: ["es.promise.with-resolvers"],
modernPolyfills: ["es.promise.with-resolvers"],
}),