Skip to content

Commit b712f5c

Browse files
committed
Remove git output from diff view in Vite troubleshooting section (#5623)
1 parent c9c3c0a commit b712f5c

File tree

1 file changed

+3
-7
lines changed
  • src/platforms/javascript/common/troubleshooting

1 file changed

+3
-7
lines changed

src/platforms/javascript/common/troubleshooting/index.mdx

+3-7
Original file line numberDiff line numberDiff line change
@@ -438,18 +438,14 @@ Error: Could not resolve './{}.js' from node_modules/@sentry/utils/esm/index.js
438438

439439
This might be because the [`define`](https://vitejs.dev/config/shared-options.html#define) option in your Vite config is string-replacing some variable used by the Sentry SDK, like `global`, which causes build errors. Vite recommends using `define` for CONSTANTS only, and not putting `process` or `global` into the options. To fix this build error, remove or update your `define` option, as shown below:
440440

441-
```diff
442-
diff --git a/vite.config.ts b/vite.config.ts
443-
index 8614337..005915c 100644
444-
--- a/vite.config.ts
445-
+++ b/vite.config.ts
446-
@@ -6,8 +6,5 @@ export default defineConfig({
441+
```diff {filename:vite.config.ts}
442+
export default defineConfig({
447443
build: {
448444
sourcemap: true
449445
},
450446
- define: {
451447
- global: {}
452448
- },
453449
plugins: [react()]
454-
})
450+
})
455451
```

0 commit comments

Comments
 (0)