Skip to content

Fix JSHost.Import from the WebWorker with fingerprinting enabled - #22330

Merged
MrJul merged 1 commit into
mainfrom
browser/fix-mt-with-fingerprinting
Sep 28, 2026
Merged

MrJul merged 1 commit into
mainfrom
browser/fix-mt-with-fingerprinting

Conversation

@maxkatz6

Copy link
Copy Markdown
Member

What does the pull request do?

Fixes a regression from #22266
After that PR, avalonia JS files are fingerprinted (file hash included as file suffix).
JS modules resolve these files through importmap, a dictionary of plain name to the physical file name to download. So it works in normal SingleThreaded app.

In multithreading we run a custom WebWorker for the render thread, side-stepping .NET runtime things. And web workers don't have access to the document's importmap. And so, we need to manually resolve its physical file name once on main thread, before it's usable in web worker.

minify: true,
format: "esm",
target: "es2019",
target: "es2020",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that typescript config already targeted es2020.

@github-actions

Copy link
Copy Markdown

NuGet packages

The packages for this pull request have been published (workflow run):

@MrJul MrJul left a comment

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.

LGTM!

@MrJul
MrJul added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit bc4d439 Sep 28, 2026
12 checks passed
@MrJul
MrJul deleted the browser/fix-mt-with-fingerprinting branch September 28, 2026 09:40
grokys pushed a commit to Evan260/Avalonia that referenced this pull request Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants