New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__STATIC_CONTENT_MANIFEST is empty - can't list files in the Workers Site #233
Comments
Hey! 👋 Thanks for raising this. As mentioned in the docs you linked, the reason I did this was to disable caching, which would serve outdated files. Wrangler solves this problem by uploading files with a content hash appended to their name.
I'm tempted to go with option 1, even though I don't like the idea of deleting cached files especially with the |
Thanks for responding and acknowledging the issue! I'll be honest that I am not familiar enough with the inner workings of Wrangler. I will trust your judgement on this! |
@ItalyPaleAle are you passing const mf = new Miniflare({
scriptPath: "index.js",
sitePath: "public",
modules: true,
}); See Cloudflare Starter Kit → |
@koistya I'm using the CLI and I'm passing the |
Oh, I see, it works with I had to add a stub for
|
When using Workers Site,
import manifestJSON from '__STATIC_CONTENT_MANIFEST'
imports a variablemanifestJSON
that contains the JSON manifest, encoded as string, which lists all files in the Site.Using Miniflare, that manifest is empty.
I understand from the docs that this is by design, however there are situations where accessing the manifest is needed. My app does that to match the correct file to return (e.g. if the extension is missing)
Svelte Kit's adapter
cloudflare-workers
is another app (more popular/relevant than what I'm building :) ) that needs that.Currently, this behavior is preventing me from being able to use Miniflare.
The text was updated successfully, but these errors were encountered: