build: replace parcel with vite for docs + cleanups#2025
Merged
Conversation
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>
|
🎉 This PR is included in version 4.5.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
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)parcelforvite+@vitejs/plugin-reactto builddemo/vite.config.ts:root: demo,base: /react-geolocated/on build (root in dev), output todemo/distto match the GitHub Pages workflowdocs:dev→vite,docs:build→vite buildtargetsblock and now-unusedbrowserslist.postcssrc.json(it still referenced the already-removed@tailwindcss/postcss) and droppostcss,autoprefixer, and the Parcel-onlyprocesspolyfilllmdb,@swc/core,@parcel/watcher) is gone, so no morenode-gypinstall-script warningsHook simplification + npmignore (
cb28fd2)sameCoordsto module scope, drop itsuseCallbackwrapperjest.config.jsentry from.npmignoreTailwind dep cleanup (
495ce14) — pre-existing commit on this branchVerification
npm run docs:build→ emits/react-geolocated/-prefixed assets todemo/distnpm run docs:dev→ dev server boots, serves#rootat localhost root (200)npm run dist→ cleannpm test(lint + 4 tests) → all passGitHub Pages workflow (
pages.yml) needs no change — samedocs:buildscript, samedemo/distupload path.🤖 Generated with Claude Code