chore: remove deprecated react-hot-loader
User description
Summary
This PR removes the deprecated react-hot-loader package since React Refresh is already configured and working in the project via the SWC loader.
Changes:
- Removed
react-hot-loaderdependency from package.json - Removed hot() wrapper from App.tsx
- Removed setHotLoaderConfig from preamble.ts
- Removed react-hot-loader/babel plugin from babel.config.js
- Removed react-hot-loader from webpack vendor bundle
- Cleaned up related comments
Before/After
Before: Project had both react-hot-loader (deprecated) and React Refresh configured After: Only React Refresh is used for hot module replacement
Testing Instructions
- Run
npm run dev-server - Make changes to React components
- Verify hot module replacement works correctly (components update without full page refresh)
- Verify no console errors related to hot module replacement
✅ Tested locally: Dev server compiles successfully and HMR works as expected.
Additional Information
React Refresh has been the recommended HMR solution for React since React 17. The react-hot-loader package is deprecated and no longer maintained. This migration simplifies our development setup by removing unnecessary dependencies.
🤖 Generated with Claude Code
CodeAnt-AI Description
Remove deprecated react-hot-loader and add dependency-checker tool
What Changed
- Removed react-hot-loader and all references (package.json, package-lock, babel plugin, webpack vendor list, and hot() wrapper); development hot module replacement continues to work via React Refresh.
- Dev server no longer triggers deprecated react-hot-loader warnings and the dev vendor bundle no longer contains react-hot-loader, reducing the development bundle size.
- Added a new CLI script (scripts/check-dependencies.py) and an agent doc (AGENTS/dependency-checker.md) that scan the frontend codebase for unused or transitive npm dependencies and produce human-readable and JSON reports with keep/remove/investigate recommendations.
Impact
✅ No deprecated HMR warnings in dev server
✅ Smaller dev vendor bundle during development
✅ Easier detection of unused frontend dependencies
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
@codeant-ai ask: Your question here
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
@codeant-ai ask: Can you suggest a safer alternative to storing this secret?
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
@codeant-ai: Your feedback here
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
@codeant-ai: Do not flag unused imports.
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
@codeant-ai: review
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
CodeAnt AI is reviewing your PR.
Nitpicks 🔍
| 🔒 No security issues identified |
⚡ Recommended areas for review
|
CodeAnt AI finished reviewing your PR.
CodeAnt AI is running Incremental review