@@ -157,46 +157,41 @@ For example, update your scripts in `package.json`.
157157
158158## Add Readable Stack Traces to Errors
159159
160- To upload source maps, use the ` sentrySolidStartVite ` plugin from ` @sentry/solidstart ` and configure an auth token.
161- Auth tokens can be passed to the plugin explicitly with the ` authToken ` option. You can use the
162- ` SENTRY_AUTH_TOKEN ` environment variable or have an ` .env.sentry-build-plugin ` file in the working directory when
163- building your project.
160+ To upload source maps, configure an auth token. Auth tokens can be passed to ` withSentry ` explicitly with the ` authToken `
161+ option. You can also use the ` SENTRY_AUTH_TOKEN ` environment variable or have an ` .env.sentry-build-plugin ` file in the
162+ working directory when building your project.
164163
165- We recommend you add the auth token to your CI/CD environment as an environment variable.
164+ < OrgAuthTokenNote />
166165
167- Learn more about configuring the plugin in our
168- [ Sentry Vite Plugin documentation] ( https://www.npmjs.com/package/@sentry/vite-plugin ) .
166+ Update your ` app.config.ts ` :
169167
170- <OrgAuthTokenNote />
168+ ``` TypeScript {filename:app.config.ts}
169+ import { withSentry } from ' @sentry/solidstart' ;
170+ import { defineConfig } from ' @solidjs/start/config' ;
171+
172+ export default defineConfig (
173+ withSentry (
174+ {
175+ /* Your SolidStart config */
176+ },
177+ {
178+ org: " ___ORG_SLUG___" ,
179+ project: " ___PROJECT_SLUG___" ,
180+ authToken: " ___ORG_AUTH_TOKEN___" ,
181+ }
182+ ),
183+ );
184+ ```
185+
186+ or create a ` .env.sentry-build-plugin ` file:
171187
172188``` bash {filename:.env.sentry-build-plugin}
173189SENTRY_ORG=" ___ORG_SLUG___"
174190SENTRY_PROJECT=" ___PROJECT_SLUG___"
175191SENTRY_AUTH_TOKEN=" ___ORG_AUTH_TOKEN___"
176192```
177193
178- Add the plugin to your ` app.config.ts ` .
179-
180- ``` TypeScript {filename:app.config.ts}
181- // app.config.ts
182- import { defineConfig } from ' @solidjs/start/config' ;
183- import { sentrySolidStartVite } from ' @sentry/solidstart' ;
184-
185- export default defineConfig ({
186- // ...
187-
188- vite: {
189- plugins: [
190- sentrySolidStartVite ({
191- org: process .env .SENTRY_ORG ,
192- project: process .env .SENTRY_PROJECT ,
193- authToken: process .env .SENTRY_AUTH_TOKEN ,
194- }),
195- ],
196- },
197- // ...
198- });
199- ```
194+ We recommend adding the auth token to your CI/CD environment as an environment variable.
200195
201196## Verify
202197
0 commit comments