Skip to content

hono/jsx/server + hono/jsx/streaming module imports under Perry-native (follow-up to #1653) #1671

Description

@proggeramlug

Follow-up to #1653 (closed — Perry's js_jsx now renders intrinsic JSX to HTML, so <Component/> produces a JSXNode object that stringifies to markup, and the String(<div/>) / c.html(<Layout/>) paths work).

The remaining piece from #1653's acceptance: the hono/jsx/server and hono/jsx/streaming module imports still need to resolve under Perry-native compile.

const mod = await import('hono/jsx/server')      // should expose jsx/jsxs/Fragment/JSXNode
const s   = await import('hono/jsx/streaming')    // should expose renderToReadableStream/Suspense

Note: Perry's JSX is rendered by the built-in js_jsx runtime (the injected react/jsx-runtime import is vestigial — codegen routes jsx/jsxs to js_jsx unconditionally), so these hono submodules are needed for code that imports the runtime/streaming helpers directly rather than for the JSX transform itself. May also want to honor jsxImportSource so the runtime source is configurable rather than hardcoded.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions