fix: afterPlugin/beforePlugin was not effective on the frontend
Massimo Melina committed
Oct 22, 2025 at 20:05 UTC
1dbee399fdc5dc94037cc403c589942a144adbd0
1 file changed
+5
-3
frontend/src/App.ts
+5
-3
@@ -76,6 +76,8 @@ document.addEventListener('readystatechange', () => {
76
})
77
78
// load plugins' now, as vite-legacy delayed app's loading
79
-for (const [plugin, files] of Object.entries(getHFS().loadScripts))
80
- if (Array.isArray(files)) for (const f of files)
81
- loadScript(f, { plugin })
\ No newline at end of file
79
+;(async () => { // without this wrapper I see a longer delay
80
+ for (const [plugin, files] of Object.entries(getHFS().loadScripts))
81
+ if (Array.isArray(files)) for (const f of files)
82
+ await loadScript(f, { plugin })
83
+})()