You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
8. To catch errors and performance data in your universal `load` functions (e.g. in `+page.(js|ts)`), wrap our `wrapLoadWithSentry` function around your load code:
129
+
### 4. Configuring `load` Functions
130
+
131
+
5. To catch errors and performance data in your universal `load` functions (e.g. in `+page.(js|ts)`), wrap our `wrapLoadWithSentry` function around your load code:
@@ -125,7 +138,7 @@ Although the SDK is not yet stable, you're more than welcome to give it a try an
125
138
});
126
139
```
127
140
128
-
9. To catch errors and performance data in your server `load`functions (e.g. in`+page.server.(js|ts)`), wrap our `wrapServerLoadWithSentry`function around your load code:
141
+
6. To catch errors and performance data in your server `load`functions (e.g. in`+page.server.(js|ts)`), wrap our `wrapServerLoadWithSentry`function around your load code:
129
142
130
143
```javascript
131
144
import { wrapServerLoadWithSentry } from '@sentry/sveltekit';
@@ -135,6 +148,22 @@ Although the SDK is not yet stable, you're more than welcome to give it a try an
135
148
});
136
149
```
137
150
151
+
### 5. Vite Setup
152
+
153
+
3. Add our `withSentryViteConfig` wrapper around your Vite config so that the Sentry SDK can add its plugins to your Vite config `vite.config.(js|ts)`:
In the near future this wrapper will add and configure our [Sentry Vite Plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/vite-plugin) to automatically upload source maps to Sentry.
165
+
Furthermore, if you prefer to intialize the Sentry SDK in dedicated files, instead of the hook files, you can move the `Sentry.init` code to `sentry.(client|server).config.(js|ts)` files and `withSentryViteConfig` will take care of adding them to your server and client bundles.
166
+
138
167
## Known Limitations
139
168
140
169
This SDK is still under active development and several features are missing.
0 commit comments