-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
π bugSomething isn't workingSomething isn't workingπ¨ sdksIssues related to language SDKsIssues related to language SDKs
Milestone
Description
Describe the bug
I developed an application that uses the html helper from Hono. The original code is the following one (before bundling it with esbuild):
import { Hono } from 'hono'
import { html } from 'hono/html'
const app = new Hono()
app.get('/:username', (c) => {
const { username } = c.req.param()
return c.html(
html`<!DOCTYPE html>
<h1>Hello! ${username}!</h1>`
);
})
export default app;Wasm Workers Server returns an "error running the function" message.
Reproduction steps
-
Create a new folder
-
Create an
index.jsfile with the content above -
Bundle it with esbuild:
npx esbuild index.js --format=esm --bundle --outfile=dist/[...app].js -
Run the current
mainbranch of the project and pass thedistfolder as an argument:cargo run -- ../PATH_TO_HONO_PROJECT_FOLDER/dist -
Try to access http://localhost:8080/hi
Expected behavior
The following application returns a correct HTML code instead of an error.
Additional context
No response
Metadata
Metadata
Assignees
Labels
π bugSomething isn't workingSomething isn't workingπ¨ sdksIssues related to language SDKsIssues related to language SDKs