Skip to content

Commit 4631cf3

Browse files
committed
review suggestions
1 parent 61cc300 commit 4631cf3

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

CHANGELOG.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Work in this release was contributed by @aloisklink, @arturovt, @benjick and @ma
1414

1515
- **feat(solidstart)!: Default to `--import` setup and add `autoInjectServerSentry` ([#14862](https://github.com/getsentry/sentry-javascript/pull/14862))**
1616

17-
To enable the SolidStart SDK, wrap your Solid Config with `withSentry`. The `sentrySolidStartVite` plugin is now automatically
17+
To enable the SolidStart SDK, wrap your SolidStart Config with `withSentry`. The `sentrySolidStartVite` plugin is now automatically
1818
added by `withSentry` and you can pass the Sentry build-time options like this:
1919

2020
```js
@@ -24,16 +24,13 @@ import { withSentry } from '@sentry/solidstart';
2424
export default defineConfig(
2525
withSentry(
2626
{
27-
/* Your Solid config options... */
27+
/* Your SolidStart config options... */
2828
},
2929
{
3030
// Options for setting up source maps
3131
org: process.env.SENTRY_ORG,
3232
project: process.env.SENTRY_PROJECT,
3333
authToken: process.env.SENTRY_AUTH_TOKEN,
34-
35-
// Optional: Install Sentry with a top-level import
36-
autoInjectServerSentry: 'top-level-import',
3734
},
3835
),
3936
);
@@ -44,9 +41,20 @@ Add the Sentry server config in `src/instrument.server.ts`. Then, the server con
4441

4542
Now, there are two options to set up the SDK:
4643

47-
1. (recommended) Provide an `--import` CLI flag to the start command like this (path depends on your server setup):
44+
1. **(recommended)** Provide an `--import` CLI flag to the start command like this (path depends on your server setup):
4845
`node --import ./.output/server/instrument.server.mjs .output/server/index.mjs`
4946
2. Add `autoInjectServerSentry: 'top-level-import'` and the Sentry config will be imported at the top of the server entry (comes with tracing limitations)
47+
```js
48+
withSentry(
49+
{
50+
/* Your SolidStart config options... */
51+
},
52+
{
53+
// Optional: Install Sentry with a top-level import
54+
autoInjectServerSentry: 'top-level-import',
55+
},
56+
);
57+
```
5058

5159
## 8.45.0
5260

dev-packages/e2e-tests/test-applications/solidstart/tests/errorboundary.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ test('captures an exception', async ({ page }) => {
1111
});
1212

1313
await page.goto('/error-boundary');
14-
// The first page load causes a hydration error on the dev server sometimes - a reload works around this
15-
await page.reload();
1614
await page.locator('#caughtErrorBtn').click();
1715
const errorEvent = await errorEventPromise;
1816

packages/solidstart/src/config/addInstrumentation.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ export const serverFilePresets = ['netlify'];
1515
* TODO: The mechanism of manually copying those files could maybe be improved
1616
*
1717
* This will no-op if no `instrument.server.js` file was found in the
18-
* build directory. Make sure the `sentrySolidStartVite` plugin was
19-
* added to `app.config.ts` to enable building the instrumentation file.
18+
* build directory.
2019
*/
2120
export async function addInstrumentationFileToBuild(nitro: Nitro): Promise<void> {
2221
nitro.hooks.hook('close', async () => {

0 commit comments

Comments
 (0)