You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/troubleshooting/index.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -459,7 +459,7 @@ Learn more about fixing these caching issues in the <PlatformLink to="/sourcemap
459
459
</PlatformSection>
460
460
461
461
<PlatformSection supported={['javascript.nuxt']}>
462
-
<Expandable title="'import-in-the-middle' error during startup">
462
+
<Expandable title="Failed to register 'import-in-the-middle' during build time">
463
463
After adding `sentry.server.config.ts` and building the project, you might get an error like this:
464
464
`Failed to register ESM hook import-in-the-middle/hook.mjs`. You can add an override (npm/pnpm) or a resolution (yarn)
465
465
for `@vercel/nft` to fix this. This will add the `hook.mjs` file to your build output. See the [underlying issue in the UnJS Nitro project](https://github.com/unjs/nitro/issues/2703).
@@ -490,7 +490,7 @@ Learn more about fixing these caching issues in the <PlatformLink to="/sourcemap
To upload source maps, the Sentry Nuxt Module will automatically enable source map generation in your project if it is not already enabled.
165
-
However, you need to explicitly enable source map generation on the client-side. To do this, add the following code to your Nuxt configuration:
165
+
However, you need to explicitly enable source map generation on the client-side.
166
+
To do this, add the following code to your Nuxt configuration:
166
167
167
168
```javascript {filename:nuxt.config.ts} {2}
168
169
exportdefaultdefineNuxtConfig({
169
-
sourcemap: { client:true }
170
+
sourcemap: { client:'hidden' }
170
171
});
171
172
```
172
173
173
-
This step is necessary because Nuxt sets default values for source maps ([Nuxt docs](https://nuxt.com/docs/api/nuxt-config#sourcemap)), and the Sentry Nuxt Module keeps these settings when they are explicitly defined.
174
+
The option `'hidden'` works like `true`, but suppresses the source map reference comments that would be added to the end of each generated file in the build output.
175
+
176
+
Explicitly enabling client source maps is necessary because Nuxt sets default values for source maps ([Nuxt docs](https://nuxt.com/docs/api/nuxt-config#sourcemap)), and the Sentry Nuxt Module keeps these settings when they are explicitly defined.
0 commit comments