mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 08:06:43 +08:00
修复 Safari14兼容Top-level await特性
v2.4.4引入的问题
This commit is contained in:
@@ -9,6 +9,7 @@ import { VitePWA } from 'vite-plugin-pwa'
|
||||
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { resolve } from 'node:path'
|
||||
import federation from '@originjs/vite-plugin-federation'
|
||||
import topLevelAwait from 'vite-plugin-top-level-await'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@@ -259,6 +260,12 @@ export default defineConfig({
|
||||
'related_applications': [],
|
||||
},
|
||||
}),
|
||||
topLevelAwait({
|
||||
// The export name of top-level await promise for each chunk module
|
||||
promiseExportName: '__mp_tla',
|
||||
// The function to generate import names of top-level await promise in each chunk module
|
||||
promiseImportName: i => `__mp_tla_${i}`,
|
||||
}),
|
||||
],
|
||||
define: { 'process.env': {} },
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user