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

[Miniflare 3] Fix standalone support for Workers Sites using modules #631

Closed mrbbot closed 1 year ago

mrbbot commented 1 year ago

Previously, attempting to use Workers Sites with modules: true would fail as the automatic module locator didn't know about __STATIC_CONTENT_MANIFEST. This change passes through additional modules to the locator. This change also adds support for internal "workerd:" modules to the locator (e.g. workerd:rtti).

Additionally, import manifest from "__STATIC_CONTENT_MANIFEST" was only allowed in the "root" directory of the modules virtual file-system. This change adds stub modules for each additional module in each subdirectory, that re-export the module. This allows the manifest to be imported in any directory.

Closes #630

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 61594446559a22c5cad2596d7740abff01df989d

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