generated from Seekra/repository-template
Fix top-level await in main.js #119
Reference in New Issue
Block a user
Delete Branch "chore/Old-browser-incompatibility"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix top-level await in main.js
Problem
Top-level await in src/main.js is incompatible with ES2020 build target.
Fix
Moved initialization into an async bootstrap function and removed top-level await.
Changes
Related issues
Closes: #118
@@ -23,3 +24,3 @@import './styles/variables/colors.css'await loadLanguage(getCurrentLanguage());async function bootstrap() {I think it is shorter and more readable to use an IIFE.