-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(solid): Remove need to pass router hooks to solid integration #12617
Conversation
1dd6a6d
to
f2e8773
Compare
size-limit report 📦
|
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
packages/solid/package.json
Outdated
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"import": { | ||
"types": "./build/types/index.d.ts", | ||
"default": "./build/esm/index.js" | ||
"default": "./build/esm/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be the other way around, see #12404 - is there a reason you reordered this? types should always come first!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work! much better DX! ❤️
@sentry/solid
Previously, we had to pass
useBeforeLeave
anduseLocation
tosolidRouterBrowserTracingIntegration
. This has now been removed in favor of importing the router hooks directly within the sdk as needed.Import
solidRouterBrowserTracingIntegration
from@sentry/solid/solidrouter
and add it toSentry.init
:As a result, the SDK has an optional peer dependency on
@solidjs/router
v0.13.4+
when usingsolidRouterBrowserTracingIntegration
.Note to maintainers
This package outputs types at the
build
root instead ofbuild/types
to better support projects that don't usemoduleResolution: "bundler"
.