Skip to content

Bundled UI Assets  #4

@pi0

Description

@pi0

Describe the feature

Previous discussion in nitrojs/nitro#1757 (@dargmuesli) and attempt in nitrojs/nitro#1840 (by @HigherOrderLogic)

We might support optional inline|bundle|offline: true to inline rendered HTML assets, making it offline-friendly.

I am thinking we could alternatively use fetch (server side) to directly fetch and globalThis.process?.getBuiltInModule?.('node:fs') (optional runtime requirement available in Node/Deno/Bun) to allow caching the result.

This way we can keep the library fully web-compliant and agnostic, also it might work for all 3 renderer variants (we only somehow need a search and inline logic).

Alternative would be using optional peer dependencies and dynamic import (likely a new export subpath in a way to avoid bundlers eagerly statically analyzing them) -- we also need bundled variant from all 3 current supported renderers or it will be partial.

(PR welcome if someone wants to take this)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions