Fix top-level await in main.js #119

Merged
jakob.scheid merged 2 commits from chore/Old-browser-incompatibility into main 2026-06-19 14:59:28 +02:00
Member

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

  • Remove top-level await loadLanguage(...)
  • Wrap app setup in async function bootstrap()
  • Testing
  • dev server runs
  • build succeeds
  • preview works

Related issues

Closes: #118

# 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 - Remove top-level await loadLanguage(...) - Wrap app setup in async function bootstrap() - Testing - dev server runs - build succeeds - preview works ## Related issues Closes: #118
johannes.vos added this to the mvp-frontend milestone 2026-06-19 14:50:59 +02:00
johannes.vos added the
prio
critical
area/global
type
chore
labels 2026-06-19 14:50:59 +02:00
johannes.vos self-assigned this 2026-06-19 14:50:59 +02:00
johannes.vos added this to the MVP Frontend project 2026-06-19 14:50:59 +02:00
johannes.vos added 1 commit 2026-06-19 14:51:00 +02:00
johannes.vos moved this to Review in MVP Frontend on 2026-06-19 14:51:05 +02:00
jakob.scheid reviewed 2026-06-19 14:52:10 +02:00
src/main.js Outdated
@@ -23,3 +24,3 @@
import './styles/variables/colors.css'
await loadLanguage(getCurrentLanguage());
async function bootstrap() {
Owner

I think it is shorter and more readable to use an IIFE.

I think it is shorter and more readable to use an IIFE.
jakob.scheid marked this conversation as resolved
johannes.vos added 1 commit 2026-06-19 14:55:50 +02:00
jakob.scheid approved these changes 2026-06-19 14:56:49 +02:00
jakob.scheid merged commit 235cf04b09 into main 2026-06-19 14:59:28 +02:00
jakob.scheid deleted branch chore/Old-browser-incompatibility 2026-06-19 14:59:29 +02:00
jakob.scheid moved this to Done in MVP Frontend on 2026-06-21 21:30:03 +02:00
Sign in to join this conversation.