@@ -157,58 +157,34 @@ render(
157
157
);
158
158
```
159
159
160
- # Sourcemaps and Releases
160
+ ## Uploading Source Maps
161
161
162
- To generate and upload source maps of your Solid Start app use our Vite bundler plugin.
163
-
164
- 1 . Install the Sentry Vite plugin
165
-
166
- ``` bash
167
- # Using npm
168
- npm install @sentry/vite-plugin --save-dev
169
-
170
- # Using yarn
171
- yarn add @sentry/vite-plugin --dev
172
- ```
173
-
174
- 2 . Configure the vite plugin
175
-
176
- To upload source maps you have to configure an auth token. Auth tokens can be passed to the plugin explicitly with the
177
- ` authToken ` option, with a ` SENTRY_AUTH_TOKEN ` environment variable, or with an ` .env.sentry-build-plugin ` file in the
178
- working directory when building your project. We recommend you add the auth token to your CI/CD environment as an
179
- environment variable.
162
+ To upload source maps, add the ` sentrySolidStartVite ` plugin from ` @sentry/solidstart ` to your ` app.config.ts ` and
163
+ configure an auth token. Auth tokens can be passed to the plugin explicitly with the ` authToken ` option, with a
164
+ ` SENTRY_AUTH_TOKEN ` environment variable, or with an ` .env.sentry-build-plugin ` file in the working directory when
165
+ building your project. We recommend you add the auth token to your CI/CD environment as an environment variable.
180
166
181
167
Learn more about configuring the plugin in our
182
168
[ Sentry Vite Plugin documentation] ( https://www.npmjs.com/package/@sentry/vite-plugin ) .
183
169
184
- ``` bash
185
- // .env.sentry-build-plugin
186
- SENTRY_AUTH_TOKEN=< your auth token>
187
- SENTRY_ORG=< your org>
188
- SENTRY_PROJECT=< your project name>
189
- ```
190
-
191
- 3 . Finally, add the plugin to your ` app.config.ts ` file.
192
-
193
- ``` javascript
170
+ ``` typescript
171
+ // app.config.ts
194
172
import { defineConfig } from ' @solidjs/start/config' ;
195
- import { sentryVitePlugin } from ' @sentry/vite-plugin ' ;
173
+ import { sentrySolidStartVite } from ' @sentry/solidstart ' ;
196
174
197
175
export default defineConfig ({
198
- // rest of your config
199
176
// ...
200
177
201
178
vite: {
202
- build: {
203
- sourcemap: true ,
204
- },
205
179
plugins: [
206
- sentryVitePlugin ({
180
+ sentrySolidStartVite ({
207
181
org: process .env .SENTRY_ORG ,
208
182
project: process .env .SENTRY_PROJECT ,
209
183
authToken: process .env .SENTRY_AUTH_TOKEN ,
184
+ debug: true ,
210
185
}),
211
186
],
212
187
},
188
+ // ...
213
189
});
214
190
```
0 commit comments