Skip to content

build: replace parcel with vite for docs + cleanups#2025

Merged
no23reason merged 3 commits into
masterfrom
simple
Jun 28, 2026
Merged

build: replace parcel with vite for docs + cleanups#2025
no23reason merged 3 commits into
masterfrom
simple

Conversation

@no23reason

Copy link
Copy Markdown
Owner

Summary

Replaces Parcel with Vite for the docs demo and folds in a couple of small cleanups. Builds on top of the recently-merged Jest→Vitest migration (#2023), so the repo now uses a single Vite-based toolchain for both tests and docs.

Changes

Parcel → Vite (28af8dc)

  • Swap parcel for vite + @vitejs/plugin-react to build demo/
  • New vite.config.ts: root: demo, base: /react-geolocated/ on build (root in dev), output to demo/dist to match the GitHub Pages workflow
  • Scripts: docs:devvite, docs:buildvite build
  • Drop the Parcel targets block and now-unused browserslist
  • Remove dead PostCSS setup: delete .postcssrc.json (it still referenced the already-removed @tailwindcss/postcss) and drop postcss, autoprefixer, and the Parcel-only process polyfill
  • Net effect: 102 packages removed on install — Parcel's native-dep tree (lmdb, @swc/core, @parcel/watcher) is gone, so no more node-gyp install-script warnings

Hook simplification + npmignore (cb28fd2)

  • Hoist sameCoords to module scope, drop its useCallback wrapper
  • Remove stale jest.config.js entry from .npmignore

Tailwind dep cleanup (495ce14) — pre-existing commit on this branch

Verification

  • npm run docs:build → emits /react-geolocated/-prefixed assets to demo/dist
  • npm run docs:dev → dev server boots, serves #root at localhost root (200)
  • npm run dist → clean
  • npm test (lint + 4 tests) → all pass

GitHub Pages workflow (pages.yml) needs no change — same docs:build script, same demo/dist upload path.

🤖 Generated with Claude Code

no23reason and others added 3 commits June 28, 2026 14:46
There was a left-over dependency we no longer need.
- src: hoist sameCoords to module scope, drop its useCallback wrapper
- .npmignore: remove stale jest.config.js entry

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- swap parcel for vite + @vitejs/plugin-react to build the demo docs;
  removes parcel's native-dep tree (102 packages dropped on install)
- add vite.config.ts: root=demo, base=/react-geolocated/ on build (root
  locally), output to demo/dist to match the GitHub Pages workflow
- scripts: docs:dev -> vite, docs:build -> vite build
- drop parcel "targets" block and now-unused browserslist
- remove dead PostCSS setup: delete .postcssrc.json (referenced the
  already-removed @tailwindcss/postcss) and drop postcss, autoprefixer,
  and the parcel-only process polyfill

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@no23reason no23reason merged commit c1844fd into master Jun 28, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant