Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error for top-level async with hotdeploy=true #20012

Open
Legioth opened this issue Sep 20, 2024 · 0 comments
Open

No error for top-level async with hotdeploy=true #20012

Legioth opened this issue Sep 20, 2024 · 0 comments

Comments

@Legioth
Copy link
Member

Legioth commented Sep 20, 2024

Description of the bug

In an application that uses a top-level await, errors are shown only when a bundle is being built (production build or app bundle when using hotdeploy=false) but not when running through Vite's dev mode (hotdeploy=true). This may lead to surprises in a late stage of development.

Expected behavior

Expected that Vite complains about top-level async also in dev mode with hotdeploy=true.

Minimal reproducible example

  1. Get a Hilla app from start.vaadin.com
  2. Launch once to generate frontend files
  3. Copy frontend/generated/index.tsx into frontend´ and add a top-level await`
  4. Notice that there are no errors
  5. Create a production build
  6. Notice errors

Versions

  • Vaadin / Flow version: 24.5.0.beta1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant