discourse/public/javascripts
David Taylor a32f09021f
DEV: Refactor worker and WASM loading for media-optimization-worker (#40793)
- Add new `discourse/app/workers/...` directory

- Adds a custom rolldown plugin which can create a dynamic entrypoint
and return a digested URL for it

- Update media-optimization service to use this new rolldown interface,
and launch the worker via a `blob:`

- Updates media-optimization to use type:module worker, and improve
boot-error-handling strategy

This is an improvement for a few reasons:

1. We can drop all the manual entrypoint/manifest/ruby config which was
used to obtain the media-optimization bundle URL

2. We don't need to serve the worker from the (undigested/uncached)
`public/` directory on the forum domain. Instead we just generate a
one-liner worker entrypoint and create a blob from it

3. Since we're launching from a blob, the worker inherits the CSP of the
host document, which is a nice defense-in-depth improvement
2026-06-12 09:18:32 +01:00
..
count.js
embed-topics.js
embed.js FIX: Use iframe style.height for embed resize messages (#39321) 2026-04-16 15:17:06 -03:00