ESM ports with attribution: nanohtml 1.10.0 server tag (browserify/babel transform branches removed — pure runtime), raw-server, and nanomorph 5.4.3 consolidated into one module. browser.js is a Phase 2 placeholder that throws loudly. Covered by test/server.test.js on node:test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
16 lines
546 B
JavaScript
16 lines
546 B
JavaScript
// Phase 2 (rendering core) lands here: a runtime-only tagged template that
|
|
// parses each template once (keyed by its strings array in a WeakMap) and
|
|
// instantiates DOM by cloning. No compile step, ever.
|
|
//
|
|
// Until then, importing @choojs/html in a browser build fails loudly rather
|
|
// than silently rendering nothing.
|
|
|
|
export default function html () {
|
|
throw new Error(
|
|
'@choojs/html: the browser renderer is not implemented yet (v8 Phase 2). ' +
|
|
'Server-side rendering via the "node" condition works today.'
|
|
)
|
|
}
|
|
|
|
export { html }
|