It doesn't do propagation, it's pull-based caching with a 60 second minimum.
It doesn't do propagation, it's pull-based caching with a 60 second minimum.

Cannot find module '__STATIC_CONTENT_MANIFEST' or its corresponding type declarations.ts(2307)



env.d.ts with the content:root part? Does it just 404?http://127.0.0.1:8787/static/htmx.js returns 404 Not Found// src/index.ts
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST"; //Cannot find module '__STATIC_CONTENT_MANIFEST' or its corresponding type declarations.ts(2307)
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest }));
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;#wrangler.toml
name = "hono-htmx"
compatibility_date = "2023-12-01"
main = "src/index.ts"
[site]
bucket = "./assets"env.d.tsroothttp://127.0.0.1:8787/static/htmx.js404 Not Founddeclare module '__STATIC_CONTENT_MANIFEST' {
const manifest: string
export default manifest
}//custom.d.ts
declare module "__STATIC_CONTENT_MANIFEST" {
const content: string;
export default content;
}// src/index.ts
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./lib/templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST";
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest }));
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/simple.css", serveStatic({ path: "./simple.css", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import Home from "./lib/templates/index.html";
import manifest from "__STATIC_CONTENT_MANIFEST";
const app = new Hono();
app.get("/static/*", serveStatic({ root: "./", manifest })); // This does NOT work...
// below get method should be typed individual files?
app.get("/htmx.js", serveStatic({ path: "./htmx.js", manifest }));
app.get("/simple.css", serveStatic({ path: "./simple.css", manifest }));
app.get("/", (c) => {
return c.html(Home);
});
export default app;