cloudflare / miniflare

🔥 Fully-local simulator for Cloudflare Workers. For the latest version, see https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare.
https://miniflare.dev
MIT License
3.78k stars 205 forks source link

Add module __STATIC_CONTENT_MANIFEST #622

Closed armfazh closed 1 year ago

armfazh commented 1 year ago

Workers Sites sets the module __STATIC_CONTENT_MANIFEST to store paths to static assets. Documentation: https://miniflare.dev/storage/sites#internal-details

Related Changes

workerd - needs to detect the module. See https://github.com/cloudflare/workerd/pull/828 miniflare - needs to detect the module. See this PR. workers-sdk - needs to detect the module. See https://github.com/cloudflare/workers-sdk/pull/3084 workers-rs - requires changes to workerd, miniflare and workers-sdk. See https://github.com/cloudflare/workers-rs/pull/308

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 3168ecb5745fd2acf3e6430612cacf1d74962847

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

penalosa commented 1 year ago

Going forward, we’ll be overhauling the Sites/Assets system as part of Pages/Workers convergence, and will inherit the benefits of the Pages assets system.

In the meantime, Pages is the best choice for deploying sites with static assets.

mrbbot commented 1 year ago

Re-opening this PR as a fix for #630. Miniflare 3 provides support for Workers Sites via sitePath, but this option is broken if using automatic module collection. The comment above still holds, but given Miniflare is already providing support, we should make sure it works.

mrbbot commented 1 year ago

Closing this in favour of #631 which adds a few more fixes required to get sites to work. 👍