Skip to content

refactor: consume htm from npm instead of an inlined minified copy - #66

Merged
ayo-run merged 1 commit into
mainfrom
claude/html-js-dependency-u6jnl5
Jul 21, 2026
Merged

refactor: consume htm from npm instead of an inlined minified copy#66
ayo-run merged 1 commit into
mainfrom
claude/html-js-dependency-u6jnl5

Conversation

@ayo-run

@ayo-run ayo-run commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Add htm as dev dep

src/html.js previously carried a hand-copied, minified snapshot of htm's
parser that no one could review or update. Replace it with an import of
the published `htm/mini` build (added as a devDependency) bound to the
same `h(type, props, children)` hyperscript.

htm/mini matches the old copy's behavior — the discarded `new Map()` in
the snapshot meant it was already cache-free. esbuild's `--bundle` inlines
htm into dist/ at build time, so the published package stays
zero-runtime-dependency. dist/html.js is 569 B, within the 600 B budget.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013do3MDHVoaetoPD229yExu
@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for demo-wcb ready!

Name Link
🔨 Latest commit 56c754b
🔍 Latest deploy log https://app.netlify.com/projects/demo-wcb/deploys/6a6004b334edaf000829adc4
😎 Deploy Preview https://deploy-preview-66--demo-wcb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for web-component-io ready!

Name Link
🔨 Latest commit 56c754b
🔍 Latest deploy log https://app.netlify.com/projects/web-component-io/deploys/6a6004b3d2cc880008649cc3
😎 Deploy Preview https://deploy-preview-66--web-component-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ayo-run
ayo-run merged commit 4965231 into main Jul 21, 2026
10 checks passed
@ayo-run
ayo-run deleted the claude/html-js-dependency-u6jnl5 branch July 21, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants