Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
6cb5513
feat(browser): Add environment variable support for Spotlight configu…
BYK Nov 13, 2025
f16380f
change priority order for SENTRY_SPOTLIGHT
BYK Nov 14, 2025
fda3d61
fixup changelog
BYK Nov 14, 2025
bcff50d
some more clean up
BYK Nov 14, 2025
cd42ebd
address issues raised by agents
BYK Nov 14, 2025
0ac2828
Fix test failure in CI (#18210)
BYK Nov 14, 2025
0915965
Merge branch 'develop' into feat/spotlight-environment-variable-support
BYK Nov 14, 2025
6ea8d90
Process and resolve pull request comments (#18235)
BYK Nov 17, 2025
870be3b
Merge branch 'master' into feat/spotlight-environment-variable-support
BYK Nov 20, 2025
1cf7f7f
Merge branch 'develop' into feat/spotlight-environment-variable-support
BYK Dec 4, 2025
b6fda2b
some tests etc
BYK Dec 4, 2025
469940b
fix tests
BYK Dec 4, 2025
be6f1b5
add env2bool export back just in case
BYK Dec 4, 2025
c9b13e3
fix lint
BYK Dec 4, 2025
d129a79
Merge branch 'develop' into feat/spotlight-environment-variable-support
BYK Dec 4, 2025
f542f62
fix ts errors
BYK Dec 4, 2025
4c28587
fix prettier
BYK Dec 4, 2025
f9b555a
lint fixes
BYK Dec 4, 2025
e12b3fc
fix tests
BYK Dec 4, 2025
ab56171
fix prettification
BYK Dec 4, 2025
6cbd1fd
type error
BYK Dec 4, 2025
3bc5309
remove module field to fix webpack 4
BYK Dec 4, 2025
c78da67
remove unused ts-ignore
BYK Dec 5, 2025
fb3f764
fix maybe?
BYK Dec 5, 2025
d556863
fixes
BYK Dec 5, 2025
64c4692
works now?
BYK Dec 5, 2025
75f2b49
sigh
BYK Dec 5, 2025
9f1e28f
really?
BYK Dec 5, 2025
a23d53a
fix(e2e): explicitly pass spotlight env var to init in production builds
BYK Dec 5, 2025
90eca4e
fix(e2e): use development SDK exports for Spotlight env var tests
BYK Dec 5, 2025
f16915a
fix(e2e): use vite dev server for realistic Spotlight testing
BYK Dec 5, 2025
c7c9b95
feat(e2e): add Next.js Spotlight dev mode test application
BYK Dec 5, 2025
cb298e2
prettification
BYK Dec 5, 2025
5fdcf7d
fix(e2e): configure Next.js to use development export conditions
BYK Dec 5, 2025
c12edfc
feat(nextjs): auto-enable development export conditions in dev mode
BYK Dec 5, 2025
2ea8c45
fix(e2e): revert Vite app to use production build with dev SDK exports
BYK Dec 5, 2025
433c0ac
fix(e2e): update errors.test.ts to handle dev-mode filenames
BYK Dec 5, 2025
212a8bb
fix(nextjs): add conditionNames to WebpackConfigObject resolve type
BYK Dec 5, 2025
516ede0
fix(e2e): fix worker filename regex patterns
BYK Dec 5, 2025
5df223a
fix(nextjs): revert automatic development conditions
BYK Dec 5, 2025
102dc61
fix(nextjs): preserve existing conditionNames when adding development
BYK Dec 5, 2025
d4662e5
fix(nextjs): handle case where conditionNames doesn't exist
BYK Dec 5, 2025
7cffb67
fix(nextjs): add browser/node condition for client/server bundles
BYK Dec 5, 2025
dde88ca
fix(nextjs): use resolve.alias to point @sentry/browser to dev build
BYK Dec 5, 2025
9c6d19a
change approach
BYK Dec 5, 2025
de9943d
hmm
BYK Dec 5, 2025
f7d1ffd
again?
BYK Dec 8, 2025
3cf3a95
dot dot dot
BYK Dec 9, 2025
42d832c
Merge branch 'develop' into feat/spotlight-environment-variable-support
BYK Dec 9, 2025
4c6aaad
fallback
BYK Dec 9, 2025
d9d7124
prob not
BYK Dec 9, 2025
a313e1c
debugging
BYK Dec 9, 2025
77be213
bump nextjs size
BYK Dec 9, 2025
0d69896
lfg
BYK Dec 9, 2025
e32150d
turbopack...
BYK Dec 10, 2025
2346b4c
moare debug
BYK Dec 10, 2025
e549260
ok boss
BYK Dec 10, 2025
93eceb5
moar debug
BYK Dec 10, 2025
33df6a0
dddddebuggging
BYK Dec 10, 2025
669c71b
build fix
BYK Dec 10, 2025
8d639f4
...
BYK Dec 10, 2025
ca898d9
hmm
BYK Dec 10, 2025
855ff97
?
BYK Dec 10, 2025
5deeb64
yay!
BYK Dec 10, 2025
9ef14ff
simplifications
BYK Dec 10, 2025
fcab9df
Merge branch 'develop' into feat/spotlight-environment-variable-support
BYK Dec 11, 2025
693c80e
prettier fix
BYK Dec 11, 2025
7c1107f
fix(nextjs): Use valueInjectionLoader for Spotlight config instead of…
BYK Dec 11, 2025
9a9ba91
fix(browser): Remove development-only wrapper from Spotlight auto-ena…
BYK Dec 11, 2025
65860d4
fix(nextjs): Handle Spotlight auto-enablement in Next.js client SDK
BYK Dec 11, 2025
1ab6f28
Merge branch 'develop' into feat/spotlight-environment-variable-support
BYK Dec 11, 2025
7501e60
fix(ci): Add NEXT_PUBLIC_SENTRY_SPOTLIGHT env var for E2E tests
BYK Dec 11, 2025
351046b
fix(build): Revert rollup-utils changes that broke package builds
BYK Dec 11, 2025
eca64b5
fix(browser): Remove import.meta.env check to avoid CJS syntax errors
BYK Dec 11, 2025
0ad25a3
fix(nextjs): Honor explicit spotlight option even without env var
BYK Dec 11, 2025
b9d3337
fix(browser): Update build-artifacts tests to match actual env.ts imp…
BYK Dec 11, 2025
b2716ec
fix(ci): Remove global Spotlight env vars from E2E tests
BYK Dec 11, 2025
94d86a0
refactor(ci): Set NEXT_PUBLIC_SENTRY_SPOTLIGHT via real env var inste…
BYK Dec 11, 2025
43572cf
debug: Add logging to verify Spotlight env var is set in CI
BYK Dec 11, 2025
df539cf
debug: Add logging to show globalThis vs process.env in spotlight test
BYK Dec 11, 2025
c23f1d7
debug: Capture and print console logs in spotlight test
BYK Dec 12, 2025
e5409e6
debug: Log spotlight config detection in withSentryConfig
BYK Dec 12, 2025
bf2e634
fix(test-utils): Inherit environment variables in Playwright webServer
BYK Dec 12, 2025
b16f01d
fix(nextjs): Check process.env for Spotlight config as fallback
cursoragent Dec 12, 2025
40c4967
fix(nextjs): Inject _sentrySpotlight via globalThis for reliable Spot…
cursoragent Dec 12, 2025
1642e35
debug: Add logging to verify valueInjectionLoader in Spotlight test
cursoragent Dec 12, 2025
67d1d4b
chore: Fix formatting issues
cursoragent Dec 12, 2025
ce30f02
fix(nextjs): Update Spotlight test to explicitly pass spotlight option
cursoragent Dec 12, 2025
5bc01a0
fix(e2e): Explicitly disable Spotlight in react-router-7-lazy-routes …
cursoragent Dec 12, 2025
939e0cd
fix(e2e): Fix nextjs-15-spotlight test by using explicit spotlight pa…
cursoragent Dec 12, 2025
f24fa13
was it spotlight
BYK Dec 12, 2025
c7652fe
Revert "fix(e2e): Fix nextjs-15-spotlight test by using explicit spot…
BYK Dec 12, 2025
bb65b10
it wasn't spotlight
BYK Dec 12, 2025
d62b54e
fix(e2e): Remove global VITE_SENTRY_SPOTLIGHT from run.ts
BYK Dec 12, 2025
12481ec
fix(test-utils): Use epoch-based timestamps in event proxy server
BYK Dec 12, 2025
d873831
fix(test-utils): Use Date.now() only for cross-process timestamps
BYK Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,9 @@ jobs:
NEXT_PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
REACT_APP_E2E_TEST_DSN: 'https://username@domain/123'
VITE_E2E_TEST_DSN: 'https://username@domain/123'
# Note: Spotlight env vars are NOT set globally - they should only be set
# in test apps that specifically test Spotlight functionality
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
Expand Down Expand Up @@ -988,6 +991,10 @@ jobs:
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ${{ runner.temp }}/test-application
working-directory: dev-packages/e2e-tests

- name: Set Spotlight env var for spotlight tests
if: contains(matrix.test-application, 'spotlight')
run: echo "NEXT_PUBLIC_SENTRY_SPOTLIGHT=true" >> $GITHUB_ENV

- name: Build E2E app
working-directory: ${{ runner.temp }}/test-application
timeout-minutes: 7
Expand Down Expand Up @@ -1060,6 +1067,9 @@ jobs:
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
VITE_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
# Note: Spotlight env vars are NOT set globally - they should only be set
# in test apps that specifically test Spotlight functionality
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
Expand Down Expand Up @@ -1113,6 +1123,10 @@ jobs:
run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ${{ runner.temp }}/test-application
working-directory: dev-packages/e2e-tests

- name: Set Spotlight env var for spotlight tests
if: contains(matrix.test-application, 'spotlight')
run: echo "NEXT_PUBLIC_SENTRY_SPOTLIGHT=true" >> $GITHUB_ENV

- name: Build E2E app
working-directory: ${{ runner.temp }}/test-application
timeout-minutes: 7
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '46 KB',
limit: '47 KB',
},
// SvelteKit SDK (ESM)
{
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Unreleased

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
- feat(browser): Add environment variable support for Spotlight configuration ([#18198](https://github.com/getsentry/sentry-javascript/pull/18198))
- `SENTRY_SPOTLIGHT`, `PUBLIC_SENTRY_SPOTLIGHT`, `NEXT_PUBLIC_SENTRY_SPOTLIGHT`, `VITE_SENTRY_SPOTLIGHT`, `NUXT_PUBLIC_SENTRY_SPOTLIGHT`, `REACT_APP_SENTRY_SPOTLIGHT`, `VUE_APP_SENTRY_SPOTLIGHT`, and `GATSBY_SENTRY_SPOTLIGHT`

Work in this release was contributed by @sebws. Thank you for your contribution!

Expand Down
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,72 @@ the tests in each location. Check out the `scripts` entry of the corresponding `

Note: you must run `yarn build` before `yarn test` will work.

## Running E2E Tests Locally

The E2E tests in `dev-packages/e2e-tests/test-applications/` use Playwright and pnpm. To run them locally:

### Prerequisites

1. **Enable pnpm support in Volta** (required for E2E tests):

```bash
export VOLTA_FEATURE_PNPM=1
```

Add this to your shell profile (`.bashrc`, `.zshrc`, etc.) for persistence.

2. **Build the SDK packages** you want to test:

```bash
yarn build:dev:filter @sentry/nextjs # or whichever package you're testing
```

### Running a specific E2E test app

1. Navigate to the test application directory:

```bash
cd dev-packages/e2e-tests/test-applications/<app-name>
```

2. Install dependencies:

```bash
pnpm install
```

3. Link local SDK packages (to test your changes instead of the published version):

```bash
# Remove existing @sentry packages and create symlinks to local builds
rm -rf node_modules/@sentry
mkdir -p node_modules/@sentry
ln -sf ../../../../../../../../packages/nextjs node_modules/@sentry/nextjs
ln -sf ../../../../../../../../packages/core node_modules/@sentry/core
ln -sf ../../../../../../../../packages/browser node_modules/@sentry/browser
ln -sf ../../../../../../../../packages/react node_modules/@sentry/react
# Add other packages as needed for your test
```

4. Install Playwright browsers (first time only):

```bash
npx playwright install chromium
```

5. Run the tests:

```bash
npx playwright test
```

### Troubleshooting

- **WSL2 Chromium issues**: If you encounter "Invalid file descriptor to ICU data" or segfaults, you may need a newer
Playwright version. The test apps use `@playwright/test: ~1.56.0` which works in WSL2.
- **Stale builds**: After making SDK changes, rebuild with `yarn build:dev:filter @sentry/<package>` and re-link.
- **Port conflicts**: Check if the test app's port (usually 3030) is available.

## Debug Build Flags

Throughout the codebase, you will find a `__DEBUG_BUILD__` constant. This flag serves two purposes:
Expand Down
1 change: 1 addition & 0 deletions dev-packages/e2e-tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ tmp
.tmp_build_stderr
pnpm-lock.yaml
.last-run.json
.next
3 changes: 3 additions & 0 deletions dev-packages/e2e-tests/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ async function run(): Promise<void> {
NEXT_PUBLIC_E2E_TEST_DSN: dsn,
PUBLIC_E2E_TEST_DSN: dsn,
REACT_APP_E2E_TEST_DSN: dsn,
VITE_E2E_TEST_DSN: dsn,
// Note: Spotlight env vars (VITE_SENTRY_SPOTLIGHT, etc.) are NOT set globally.
// They should only be set in test apps that specifically test Spotlight functionality.
E2E_TEST_SENTRY_ORG_SLUG: process.env.E2E_TEST_SENTRY_ORG_SLUG || DEFAULT_SENTRY_ORG_SLUG,
E2E_TEST_SENTRY_PROJECT: process.env.E2E_TEST_SENTRY_PROJECT || DEFAULT_SENTRY_PROJECT,
// Pass workspace root so tests copied to temp dirs can find local packages
Expand Down
20 changes: 10 additions & 10 deletions dev-packages/e2e-tests/test-applications/angular-17/src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Angular17</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
<head>
<meta charset="utf-8" />
<title>Angular17</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root></app-root>
</body>
</html>
20 changes: 10 additions & 10 deletions dev-packages/e2e-tests/test-applications/angular-18/src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Angular 18</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
<head>
<meta charset="utf-8" />
<title>Angular 18</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root></app-root>
</body>
</html>
20 changes: 10 additions & 10 deletions dev-packages/e2e-tests/test-applications/angular-19/src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Angular19</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
<head>
<meta charset="utf-8" />
<title>Angular19</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root></app-root>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --port 3030",
"build": "rm -rf dist && tsc && vite build",
"preview": "vite preview --port 3030",
"test": "playwright test",
"test:build": "pnpm install && pnpm build",
"test:build": "pnpm install",
"test:assert": "pnpm test"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getPlaywrightConfig } from '@sentry-internal/test-utils';

const config = getPlaywrightConfig({
startCommand: `pnpm preview`,
// Use vite dev server to test development-mode behavior (e.g., Spotlight auto-enablement)
startCommand: `pnpm dev`,
eventProxyFile: 'start-event-proxy.mjs',
eventProxyPort: 3031,
port: 3030,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import MyWorker2 from './worker2.ts?worker';
import * as Sentry from '@sentry/browser';

Sentry.init({
dsn: import.meta.env.PUBLIC_E2E_TEST_DSN,
dsn: import.meta.env.VITE_E2E_TEST_DSN,
environment: import.meta.env.MODE || 'development',
tracesSampleRate: 1.0,
debug: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/// <reference types="vite/client" />

declare const process: { env: Record<string, string | undefined> } | undefined;
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { expect, test } from '@playwright/test';
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';

// In dev mode, worker files are served as .ts with query params (e.g., worker.ts?worker_file&type=module)
// In prod mode, worker files are bundled as .js with hashes (e.g., worker-abc123.js)
const WORKER_FILENAME_PATTERN = /worker(-.+\.js|\.ts\?worker_file)/;
const WORKER2_FILENAME_PATTERN = /worker2(-.+\.js|\.ts\?worker_file)/;
const WORKER3_FILENAME_PATTERN = /worker3(-.+\.js|\.ts\?worker_file)/;

test('captures an error with debug ids and pageload trace context', async ({ page }) => {
const errorEventPromise = waitForError('browser-webworker-vite', async event => {
return !event.type && !!event.exception?.values?.[0];
Expand All @@ -25,7 +31,7 @@ test('captures an error with debug ids and pageload trace context', async ({ pag
expect(errorEvent.exception?.values).toHaveLength(1);
expect(errorEvent.exception?.values?.[0]?.value).toBe('Uncaught Error: Uncaught error in worker');
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames).toHaveLength(1);
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames?.[0]?.filename).toMatch(/worker-.+\.js$/);
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames?.[0]?.filename).toMatch(WORKER_FILENAME_PATTERN);

expect(errorEvent.transaction).toBe('/');
expect(transactionEvent.transaction).toBe('/');
Expand All @@ -39,16 +45,6 @@ test('captures an error with debug ids and pageload trace context', async ({ pag
trace_id: pageloadTraceId,
span_id: pageloadSpanId,
});

expect(errorEvent.debug_meta).toEqual({
images: [
{
code_file: expect.stringMatching(/http:\/\/localhost:3030\/assets\/worker-.+\.js/),
debug_id: expect.stringMatching(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/),
type: 'sourcemap',
},
],
});
});

test("user worker message handlers don't trigger for sentry messages", async ({ page }) => {
Expand Down Expand Up @@ -96,7 +92,7 @@ test('captures an error from the second eagerly added worker', async ({ page })
expect(errorEvent.exception?.values).toHaveLength(1);
expect(errorEvent.exception?.values?.[0]?.value).toBe('Uncaught Error: Uncaught error in worker 2');
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames).toHaveLength(1);
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames?.[0]?.filename).toMatch(/worker2-.+\.js$/);
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames?.[0]?.filename).toMatch(WORKER2_FILENAME_PATTERN);

expect(errorEvent.transaction).toBe('/');
expect(transactionEvent.transaction).toBe('/');
Expand All @@ -110,16 +106,6 @@ test('captures an error from the second eagerly added worker', async ({ page })
trace_id: pageloadTraceId,
span_id: pageloadSpanId,
});

expect(errorEvent.debug_meta).toEqual({
images: [
{
code_file: expect.stringMatching(/http:\/\/localhost:3030\/assets\/worker2-.+\.js/),
debug_id: expect.stringMatching(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/),
type: 'sourcemap',
},
],
});
});

test('captures an error from the third lazily added worker', async ({ page }) => {
Expand All @@ -146,7 +132,7 @@ test('captures an error from the third lazily added worker', async ({ page }) =>
expect(errorEvent.exception?.values).toHaveLength(1);
expect(errorEvent.exception?.values?.[0]?.value).toBe('Uncaught Error: Uncaught error in worker 3');
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames).toHaveLength(1);
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames?.[0]?.filename).toMatch(/worker3-.+\.js$/);
expect(errorEvent.exception?.values?.[0]?.stacktrace?.frames?.[0]?.filename).toMatch(WORKER3_FILENAME_PATTERN);

expect(errorEvent.transaction).toBe('/');
expect(transactionEvent.transaction).toBe('/');
Expand All @@ -160,14 +146,4 @@ test('captures an error from the third lazily added worker', async ({ page }) =>
trace_id: pageloadTraceId,
span_id: pageloadSpanId,
});

expect(errorEvent.debug_meta).toEqual({
images: [
{
code_file: expect.stringMatching(/http:\/\/localhost:3030\/assets\/worker3-.+\.js/),
debug_id: expect.stringMatching(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/),
type: 'sourcemap',
},
],
});
});
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { resolve } from 'path';
import { defineConfig } from 'vite';

export default defineConfig({
build: {
sourcemap: 'hidden',
envPrefix: ['PUBLIC_'],
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
},
},
},

plugins: [
Expand All @@ -24,6 +29,4 @@ export default defineConfig({
}),
],
},

envPrefix: ['PUBLIC_'],
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
<input type="button" value="Capture Exception" id="exception-button" />

<div id="navigation">

<a id="navigation-link" href="#navigation-target">Navigation Link</a>

<div id="navigation-target">Navigated Element</div>

</div>

<!-- The script tags for the bundled JavaScript files will be injected here by HtmlWebpackPlugin in build.mjs-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<a href={{this.href}} class={{if this.isActive 'active'}} {{on 'click' this.onClick}}>
{{yield}}
</a>
</a>
Loading
Loading