Skip to content

fix: Website build and dev server fixes#6

Merged
dogmar merged 20 commits intomainfrom
fix/netlify-builds
Apr 10, 2026
Merged

fix: Website build and dev server fixes#6
dogmar merged 20 commits intomainfrom
fix/netlify-builds

Conversation

@dogmar
Copy link
Copy Markdown
Owner

@dogmar dogmar commented Apr 9, 2026

Summary

  • Netlify deployment: Add @netlify/vite-plugin-tanstack-start and netlify.toml
  • Vite plugins: Add highlight-examples (build-time syntax highlighting for code examples) and extract-api (dev-mode API symbol extraction), replacing the runtime resolve-examples tree walker
  • Type stripping: Replace ts-blank-space with TypeScript's own transpileModule — ts-blank-space has a bug where JSX spreads cause subsequent function-call attributes to be incorrectly blanked out
  • Config: Move .env vars (VITE_PROJECT_NAME, etc.) into a checked-in website/src/config.ts, removing .env/.env.example/env.d.ts
  • CSS fixes: Fix --spacing base var (--sp), canonical class warnings, and Tailwind spacing references
  • UI tweaks: Button sizing, theme toggle, accordion, tabs, link components
  • Docs SSR fix: Fix docs index using parent route loader data during SSR

Test plan

  • vp run ready passes (lint, format, all tests, no build warnings)

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 9, 2026

Deploy Preview for colander-cal ready!

Name Link
🔨 Latest commit 84d611a
🔍 Latest deploy log https://app.netlify.com/projects/colander-cal/deploys/69d8629fe7608e00085b0a04
😎 Deploy Preview https://deploy-preview-6--colander-cal.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.

@dogmar dogmar force-pushed the fix/netlify-builds branch from 7df43a3 to ef8d19d Compare April 9, 2026 22:39
dogmar and others added 15 commits April 9, 2026 15:57
Watches package/src/ and regenerates api-data/symbols.gen.json
on changes. Runs on dev server startup and on file change.
Fixes docs page crash when symbols.gen.json doesn't exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use useSectionNav() hook (which safely searches via useMatches)
instead of directly importing parent route and calling useLoaderData(),
which returns undefined during server-side rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Tailwind v4 --spacing base variable enables a multiplier pattern
that makes any w-N class valid, defeating our restricted spacing scale.
Rename to --sp so only explicitly defined --spacing-N tokens are canonical.
Also migrate inline var(--spacing) references to theme(spacing.N).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Tailwind v4 --spacing base variable enables a multiplier pattern
that makes any w-N class valid, defeating our restricted spacing scale.
Rename to --sp so only explicitly defined --spacing-N tokens are canonical.
Also migrate inline var(--spacing) references to theme(spacing.N).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pre-generates per-file highlighted JSON (e.g. basic-calendar.highlighted.gen.json)
at build time and watches src/examples/ during dev. ExampleBlock imports
via import.meta.glob instead of receiving server-injected props.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces ts.transpileModule with ts-blank-space, which replaces type
annotations with whitespace instead of re-emitting the code. This
preserves the original file's line structure in the JS output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move all VITE_* environment variables into website/src/config.ts as
plain TypeScript constants. Remove env.d.ts and .env gitignore entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts:
#	website/src/components/Header.tsx
#	website/src/components/SourceLink.tsx
#	website/src/components/ui/accordion.tsx
#	website/src/examples/date-picker-styled.tsx
#	website/src/routes/docs/index.tsx
@dogmar dogmar changed the title chore: Fix netlify builds for website fix: Website build and dev server fixes Apr 10, 2026
dogmar and others added 3 commits April 9, 2026 19:33
The highlight-examples plugin imports typescript via strip-types.ts,
but it was only available in the root package. CI installs per-package
so website needs its own dependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dogmar dogmar merged commit 45b4f50 into main Apr 10, 2026
6 checks passed
@dogmar dogmar deleted the fix/netlify-builds branch April 10, 2026 04:03
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.

1 participant