Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions docs/migration/draft-v9-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
- Deprecated `wrapUseRoutes`. Use `wrapUseRoutesV6` or `wrapUseRoutesV7` instead.
- Deprecated `wrapCreateBrowserRouter`. Use `wrapCreateBrowserRouterV6` or `wrapCreateBrowserRouterV7` instead.

## `@sentry/nextjs`

- Deprecated `hideSourceMaps`. No replacements. The SDK emits hidden sourcemaps by default.

## `@sentry/opentelemetry`

- Deprecated `generateSpanContextForPropagationContext` in favor of doing this manually - we do not need this export anymore.
Expand Down
3 changes: 3 additions & 0 deletions packages/nextjs/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ export type SentryBuildOptions = {
/**
* Use `hidden-source-map` for webpack `devtool` option, which strips the `sourceMappingURL` from the bottom of built
* JS files.
*
* @deprecated This is deprecated. The SDK emits chunks without `sourceMappingURL` for client bundles by default.
*/
// TODO(v9): Remove option
hideSourceMaps?: boolean;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ describe('constructWebpackConfigFunction()', () => {
expect(finalWebpackConfig?.devtool).not.toEqual('source-map');
});

it('allows for the use of `hidden-source-map` as `devtool` value for client-side builds', async () => {
it('uses `hidden-source-map` as `devtool` value for client-side builds', async () => {
const finalClientWebpackConfig = await materializeFinalWebpackConfig({
exportedNextConfig: exportedNextConfig,
incomingWebpackConfig: clientWebpackConfig,
incomingWebpackBuildContext: clientBuildContext,
sentryBuildTimeOptions: { hideSourceMaps: true },
sentryBuildTimeOptions: {},
});

const finalServerWebpackConfig = await materializeFinalWebpackConfig({
exportedNextConfig: exportedNextConfig,
incomingWebpackConfig: serverWebpackConfig,
incomingWebpackBuildContext: serverBuildContext,
sentryBuildTimeOptions: { hideSourceMaps: true },
sentryBuildTimeOptions: {},
});

expect(finalClientWebpackConfig.devtool).toEqual('hidden-source-map');
Expand Down
1 change: 0 additions & 1 deletion packages/nextjs/test/types/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { NextConfig } from 'next';
import { withSentryConfig } from '../../src/config/withSentryConfig';

const config: NextConfig = {
hideSourceMaps: true,
webpack: config => ({
...config,
module: {
Expand Down
Loading