From 060afaf3c1b2cfac21a9a366c9af92f16b148675 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Wed, 7 Aug 2024 21:21:10 +0200 Subject: [PATCH 1/3] chore(solidstart): Add sourcemap instructions to README --- packages/solidstart/README.md | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/packages/solidstart/README.md b/packages/solidstart/README.md index 61aa3b2793da..9a6371d9f9da 100644 --- a/packages/solidstart/README.md +++ b/packages/solidstart/README.md @@ -161,3 +161,55 @@ render( document.getElementById('root'), ); ``` + +# Sourcemaps and Releases + +To generate and upload source maps of your Solid Start app use our vite bundler plugin. + +1. Install the Sentry vite plugin + +```bash +# Using npm +npm install @sentry/vite-plugin --save-dev + +# Using yarn +yarn add @sentry/vite-plugin --dev +``` + +2. Configure the vite plugin + +To upload source maps you have to configure an auth token. Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project. We recommend you add the auth token to your CI/CD environment as an environment variable. + +Learn more about configuring the plugin in our [Sentry Vite Plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin). + +```bash +// .env.sentry-build-plugin +SENTRY_AUTH_TOKEN= +SENTRY_ORG= +SENTRY_PROJECT= +``` + +3. Finally, add the plugin to your `app.config.ts` file. + +```javascript +import { defineConfig } from '@solidjs/start/config' +import { sentryVitePlugin } from '@sentry/vite-plugin' + +export default defineConfig({ + // rest of your config + // ... + + vite: { + build: { + sourcemap: true, + }, + plugins: [ + sentryVitePlugin({ + org: process.env.SENTRY_ORG, + project: process.env.SENTRY_PROJECT, + authToken: process.env.SENTRY_AUTH_TOKEN, + }), + ], + }, +}) +``` From 8058fe32cc78c6cb63b37388d6db6ba02209ffbe Mon Sep 17 00:00:00 2001 From: Andrei <168741329+andreiborza@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:27:20 +0200 Subject: [PATCH 2/3] Update packages/solidstart/README.md Co-authored-by: Charly Gomez --- packages/solidstart/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/solidstart/README.md b/packages/solidstart/README.md index 9a6371d9f9da..2528107493c4 100644 --- a/packages/solidstart/README.md +++ b/packages/solidstart/README.md @@ -164,7 +164,7 @@ render( # Sourcemaps and Releases -To generate and upload source maps of your Solid Start app use our vite bundler plugin. +To generate and upload source maps of your Solid Start app use our Vite bundler plugin. 1. Install the Sentry vite plugin From e1018b66f401472dbddf340978ee426498960db6 Mon Sep 17 00:00:00 2001 From: Andrei <168741329+andreiborza@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:27:28 +0200 Subject: [PATCH 3/3] Update packages/solidstart/README.md Co-authored-by: Charly Gomez --- packages/solidstart/README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/solidstart/README.md b/packages/solidstart/README.md index 2528107493c4..b654b9bdf744 100644 --- a/packages/solidstart/README.md +++ b/packages/solidstart/README.md @@ -166,8 +166,8 @@ render( To generate and upload source maps of your Solid Start app use our Vite bundler plugin. -1. Install the Sentry vite plugin - +1. Install the Sentry Vite plugin + ```bash # Using npm npm install @sentry/vite-plugin --save-dev @@ -177,10 +177,14 @@ yarn add @sentry/vite-plugin --dev ``` 2. Configure the vite plugin - -To upload source maps you have to configure an auth token. Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project. We recommend you add the auth token to your CI/CD environment as an environment variable. -Learn more about configuring the plugin in our [Sentry Vite Plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin). +To upload source maps you have to configure an auth token. Auth tokens can be passed to the plugin explicitly with the +`authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the +working directory when building your project. We recommend you add the auth token to your CI/CD environment as an +environment variable. + +Learn more about configuring the plugin in our +[Sentry Vite Plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin). ```bash // .env.sentry-build-plugin @@ -192,13 +196,13 @@ SENTRY_PROJECT= 3. Finally, add the plugin to your `app.config.ts` file. ```javascript -import { defineConfig } from '@solidjs/start/config' -import { sentryVitePlugin } from '@sentry/vite-plugin' +import { defineConfig } from '@solidjs/start/config'; +import { sentryVitePlugin } from '@sentry/vite-plugin'; export default defineConfig({ // rest of your config // ... - + vite: { build: { sourcemap: true, @@ -211,5 +215,5 @@ export default defineConfig({ }), ], }, -}) -``` +}); +```