feat: migrate from Node.js/npm to Bun with Vite bundler#2
Conversation
Prevent false subdomain detection on openscan.eth.link and openscan.eth.limo which was causing unwanted redirects to the base domain (eth.link/eth.limo).
Switch from conditional BrowserRouter/HashRouter to HashRouter everywhere. This fixes the refresh issue on IPFS gateways where deep URLs would fail to resolve since IPFS cannot handle client-side routing paths.
- Replace npm with Bun as package manager and runtime - Replace Webpack with Vite as bundler - Update all scripts to use Bun commands - Update GitHub Actions workflows to use oven-sh/setup-bun - Update documentation (README.md, CLAUDE.md) - Change dev server port from 3030 to 3000 - Replace jsdom with happy-dom for Vitest (ESM compatibility) - Remove eslintConfig (using Biome instead)
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
|
|
||
| - name: Run E2E tests | ||
| run: npm run test:e2e | ||
| run: bun run test:e2e |
There was a problem hiding this comment.
E2E tests run against dev server instead of production build
Medium Severity
The E2E workflow builds a production bundle via ./scripts/build-production.sh (which outputs to dist/) but the playwright.config.ts starts the dev server with bun run start instead of serving the built files with bun run preview. This means the production build is created but never actually tested—E2E tests run against the development server instead. The webServer command in playwright.config.ts likely needs to be bun run preview to test the production build.
Summary
oven-sh/setup-bunChanges
package.jsonpackageManager, update scripts, remove eslintConfigbunfig.tomlvite.config.tsindex.htmlvitest.config.tsplaywright.config.tsscripts/*.sh.github/workflows/*.ymlREADME.md,CLAUDE.mdRemoved
.nvmrc- No longer neededpackage-lock.json- Replaced bybun.lockwebpack.config.js- Replaced by ViteeslintConfigin package.json - Using BiomeTest plan
bun install- Installs dependencies correctlybun start- Dev server runs on port 3000bun run build- Production build succeedsbun run test:run- All 65 tests passbun run typecheck- No TypeScript errorsbun run format && bun run lint- No issues🤖 Generated with Claude Code
Note
Migrates CI to Bun and updates docs for the new toolchain.
actions/setup-node/npm withoven-sh/setup-bunandbun installacrossdeploy-gh-pages.yml,deploy-pr-preview.yml,e2e.yml, andhash-deploy-build.yml; update E2E to usebunx playwrightandbun run test:e2epin-nameREADME.mdandCLAUDE.mdto Bun/Vite commands, ports, and tooling; remove.nvmrcWritten by Cursor Bugbot for commit fde76ed. This will update automatically on new commits. Configure here.