Skip to content

Conversation

@ameshkin
Copy link
Owner

@ameshkin ameshkin commented Nov 24, 2025

Note

Makes React Router integration optional with a lazy useLocation import, wraps breadcrumb labels in Typography, and bumps package/version metadata.

  • Router integration
    • useReactRouterBreadcrumbs: replace direct react-router-dom import with a lazy/dynamic useLocation resolver; throws a clear error if the package isn’t installed.
    • Package metadata: add react-router-dom as an optional peer and dev dependency; update keywords.
  • Breadcrumbs
    • Wrap label content with Typography instead of Box in Content.
  • Release/Docs
    • Bump version to 0.1.2.
    • README: update install badge link.

Written by Cursor Bugbot for commit 657c6f4. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

routerModule = require(mod)
} catch {
// require failed, module not available
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Synchronous require in ESM module fails at runtime

The code attempts to use require() in an ESM module (package.json has "type": "module"). The require function is not available in ESM contexts or browser environments, causing this code path to always fail. The fallback logic at line 48 will always throw an error when react-router-dom isn't statically imported, making the optional peer dependency non-functional.

Fix in Cursor Fix in Web

@ameshkin ameshkin merged commit 09d0c2a into main Nov 24, 2025
3 checks passed
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.

2 participants