Skip to content

fix(new-webui): Support top-level await by updating browser compatibility target in Vite config.#1003

Merged
davemarco merged 1 commit into
y-scope:mainfrom
davemarco:bug
Jun 12, 2025
Merged

fix(new-webui): Support top-level await by updating browser compatibility target in Vite config.#1003
davemarco merged 1 commit into
y-scope:mainfrom
davemarco:bug

Conversation

@davemarco

@davemarco davemarco commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

Description

#995 introduced a top-level await to support settings loading.

However, the vite config was not configured for this leading to an error during build.

This PR changed the vite config to support top-level await on modern browsers.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

App now builds.

@davemarco davemarco requested a review from a team as a code owner June 12, 2025 18:48
@davemarco davemarco requested a review from junhaoliao June 12, 2025 18:48
export default defineConfig({
base: "./",
build: {
target: "esnext",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://esbuild.github.io/api/#target

esnext which means that by default, esbuild will assume all of the latest JavaScript and CSS features are supported.

seems that's exactly what we want since we use / will use many latest features

@davemarco

Copy link
Copy Markdown
Contributor Author

npm looks to be down, so ci failing

@davemarco davemarco merged commit ef62a97 into y-scope:main Jun 12, 2025
15 of 29 checks passed
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
…lity target in Vite config. (y-scope#1003)

Co-authored-by: Marco <david.marcovitch@yscope.com>
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

Successfully merging this pull request may close these issues.

2 participants