Good evening my good buddies, I have tried backreading this channel for related topics as well as fo

Good evening my good buddies, I have tried backreading this channel for related topics as well as following the instructions here:
https://hono.dev/getting-started/cloudflare-workers#serve-static-files,
https://www.answeroverflow.com/m/1148745533649866762
https://developers.cloudflare.com/workers/configuration/sites/start-from-worker/#add-static-assets-to-an-existing-workers-project

but to no avail, I still can't make it to work..

I want to serve my static files.. I am using Hono with cloudflare workers

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


// 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"

I appreciate the help in advanced!
image.png
image.png
image.png
Was this page helpful?