Repository navigation
Conversation
🦋 Changeset detectedLatest commit: fb3fc4f The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| }, | ||
| ], | ||
| compatibilityDate: "2026-01-01", | ||
| modules: [{ name: "assets.js", bundled: "/workerd/assets.js" }], |
There was a problem hiding this comment.
P1: Update workerd in this PR before enabling this module.
The checked-in catalog and lockfile still resolve workerd@1.20261113.1, while this bundled module is only available from the unreleased workerd change described in the PR. With the dependencies in this branch, every Miniflare instance configured with assets will fail to load /workerd/assets.js at startup. Once the release is available, update the catalog/lockfile and regenerate the config bindings in the same change so the committed test suite runs against a runtime that provides this module.
|
I'm Bonk, and I've done a quick review of your PR. Switches Miniflare static assets to workerd’s bundled assets Worker.
|
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
ba0c7bc to
02d106b
Compare
Miniflare no longer runs its own copies of the router, asset and assets-KV Workers, nor the RPC proxy in front of them, and no longer walks the assets directory to build a manifest at startup. A Worker's assets are one workerd `assets` service, which routes each request to the User Worker or to a file and sends the User Worker every other event (RPC, scheduled, tail). `env.ASSETS` binds its `AssetWorker` entrypoint. `_headers`, `_redirects` and `.assetsignore` are passed to the service as text, and `run_worker_first` and `.assetsignore` are still validated when Miniflare starts. The asset count and size limits are no longer checked locally. The read-only test now covers Workers Sites only: assets have no disk service to write to. The config types are regenerated from the pinned workerd schema plus the new `AssetsService`, and will be regenerated again against the workerd release that includes it.
02d106b to
fb3fc4f
Compare
Serves local static assets with workerd's native
assetsservice (cloudflare/workerd#8475) instead of Miniflare's own copies of the production Workers.A Worker's assets become one workerd service. It routes each request to the User Worker or to a file, and sends the User Worker every other event (RPC, scheduled, tail), so the router, asset and assets-KV Workers, the RPC proxy in front of them and the Sentry stub are deleted: +166 −663 lines, of which 105 added lines are the generated
AssetsServiceconfig types. Miniflare no longer walks the assets directory to build a manifest at startup, and files changed while it runs are served immediately.run_worker_firstand.assetsignoreare still validated when Miniflare starts. The asset count and size limits are no longer checked locally;wrangler deploystill checks them.Draft until a workerd release includes the service. The generated config types gain only
AssetsService, hand-trimmed from a regeneration against the pinned workerd plus the new schema; they will be regenerated against that release. Tests pass against a local workerd build (MINIFLARE_WORKERD_PATH).