Skip to content

Commit 32b95d7

Browse files
author
Luca Forstner
committed
feat(nextjs): Deprecate typedef for hideSourceMaps
1 parent 42ff876 commit 32b95d7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/nextjs/src/config/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ export type SentryBuildOptions = {
376376
/**
377377
* Use `hidden-source-map` for webpack `devtool` option, which strips the `sourceMappingURL` from the bottom of built
378378
* JS files.
379+
*
380+
* @deprecated This is deprecated. The SDK emits chunks without `sourceMappingURL` for client bundles by default.
379381
*/
380382
hideSourceMaps?: boolean;
381383

packages/nextjs/test/config/webpack/constructWebpackConfig.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ describe('constructWebpackConfigFunction()', () => {
6868
expect(finalWebpackConfig?.devtool).not.toEqual('source-map');
6969
});
7070

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

7979
const finalServerWebpackConfig = await materializeFinalWebpackConfig({
8080
exportedNextConfig: exportedNextConfig,
8181
incomingWebpackConfig: serverWebpackConfig,
8282
incomingWebpackBuildContext: serverBuildContext,
83-
sentryBuildTimeOptions: { hideSourceMaps: true },
83+
sentryBuildTimeOptions: {},
8484
});
8585

8686
expect(finalClientWebpackConfig.devtool).toEqual('hidden-source-map');

packages/nextjs/test/types/next.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { NextConfig } from 'next';
33
import { withSentryConfig } from '../../src/config/withSentryConfig';
44

55
const config: NextConfig = {
6-
hideSourceMaps: true,
76
webpack: config => ({
87
...config,
98
module: {

0 commit comments

Comments
 (0)