Open GiancarlosIO opened 3 weeks ago
you want override createBrowserRouter ? maybe you can use alias for react-router-dom
hh
hi @zllkjc
Yes! basically I want to do this:
const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouter(
createBrowserRouter,
);
// then use sentryCreateBrowserRouter instead if the createBrowserRouter function
const router = sentryCreateBrowserRouter([
// here would be the autogenerated routes by modernjs
]);
Is it possible with aliases? 🤔 🙏🏼
Version
Details
I'm trying to implement sentry and I can't find a way to override/customize the
createBrowserRouter
function.https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/
I was reviewing the docs but didn't find something I can use to override that. I found this but looks like this is not the way to do that: https://modernjs.dev/en/apis/app/hooks/src/app.html
Maybe there are a doc or config that I'm missing? 🙏🏼
Reproduce link
-
Reproduce Steps
-