Conversation
New demo/ Vite + React + TS app under demo/, aliased to build directly
against the current src/index.tsx (dogfooding the real source, not a
stale published version). Includes:
- A live playground with four working tabs (embed, popup, custom theme,
imperative ref) running against the actual Kakao Postcode widget, not
a mock — verified end to end with real network requests and a real
onChange payload rendered back into the page.
- A full API reference generated from the same prop/type data as the
README (props table, PostcodeOptions/theme/PostcodeCompleteData key
lists), plus install/quick-start snippets and the 1.x migration note.
- An EN/KO language toggle reusing the README's Korean translation.
- Light/dark theming via prefers-color-scheme.
Caught and fixed two real bugs while building this:
- Aliasing src/index.tsx (which lives outside demo/) made its bare
`import 'react'` resolve via the repo root's node_modules instead of
demo's own, loading two separate React copies on one page and
breaking hooks outright ("Cannot read properties of null"). Fixed
with explicit resolve.alias entries forcing every react/react-dom
specifier to demo's copy.
- The hand-rolled code-block syntax highlighter's tag/attribute passes
injected raw <span> markup directly, which a later pass (matching
`class=`) then re-matched and corrupted. Fixed by stashing every
token type behind a NUL-delimited marker so later passes never see
already-highlighted output (same class of bug, and same fix, as the
numeric-placeholder collision caught earlier in this file).
Deployment: .github/workflows/deploy-pages.yml builds demo/ and
publishes to GitHub Pages on every push to master that touches demo/
or src/. ci.yml gained a build-demo job (typecheck + build, no deploy)
so PRs validate the demo too. Needs GitHub Pages enabled with source
"GitHub Actions" in repo settings before the first deploy will work.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
demo/tsconfig.json type-checks ../src/index.tsx directly. That file lives outside demo/, so TypeScript resolves its bare `import 'react'` starting from its own location (the repo root), not from demo's own node_modules. The build-demo job only ever ran `npm ci` inside demo/, so on a clean checkout there was no root node_modules for it to find, and the job failed with "Cannot find module 'react'" plus a cascade of downstream implicit-any errors. Verified by cloning dev into a scratch directory (a truly clean checkout, matching what CI does) and reproducing the exact failure without the root install, then confirming it passes once `npm ci` runs at the repo root first. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New demo/ Vite + React + TS app under demo/, aliased to build directly against the current src/index.tsx (dogfooding the real source, not a stale published version). Includes:
Caught and fixed two real bugs while building this:
import 'react'resolve via the repo root's node_modules instead of demo's own, loading two separate React copies on one page and breaking hooks outright ("Cannot read properties of null"). Fixed with explicit resolve.alias entries forcing every react/react-dom specifier to demo's copy.class=) then re-matched and corrupted. Fixed by stashing every token type behind a NUL-delimited marker so later passes never see already-highlighted output (same class of bug, and same fix, as the numeric-placeholder collision caught earlier in this file).Deployment: .github/workflows/deploy-pages.yml builds demo/ and publishes to GitHub Pages on every push to master that touches demo/ or src/. ci.yml gained a build-demo job (typecheck + build, no deploy) so PRs validate the demo too. Needs GitHub Pages enabled with source "GitHub Actions" in repo settings before the first deploy will work.