Commit a732ae8
authored
ref(nextjs): Stop setting redundant
Before this change, `withSentryConfig` both set `productionBrowserSourceMaps` to `true` in the main `nextjs` config and set `devtool` to `source-map` in the webpack config.
It turns out, though, that the only thing the former change does is cause nextjs to make the latter change itself. [1] (All other references to `productionBrowserSourceMaps` in the nextjs code are merely type annotations or instances of passing the value from one function to another. [2] The linked code is the only place that value is actually used.) Therefore, since we're making the `devtool` config change ourselves, the `productionBrowserSourceMaps` config change was redundant, and could be removed.
(Of the two config changes, we wanted to remove this one and not the `devtool` one, since we want sourcemaps for both server and client builds. `devtool` affects both, whereas `productionBrowserSourceMaps` (as the name implies) only affects the client build.)
[1] https://github.com/vercel/next.js/blob/fa138358e1df7ca6d1bab7da57e18031d5abbf27/packages/next/build/webpack/config/blocks/base.ts#L39-L43
[2] https://github.com/vercel/next.js/search?q=productionBrowserSourceMapsproductionBrowserSourceMaps in config (#3765)1 parent a904415 commit a732ae8
2 files changed
+3
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 15 | + | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
26 | | - | |
| 22 | + | |
27 | 23 | | |
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
31 | | - | |
| 27 | + | |
32 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
| |||
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | | - | |
137 | 135 | | |
138 | 136 | | |
139 | 137 | | |
| |||
147 | 145 | | |
148 | 146 | | |
149 | 147 | | |
150 | | - | |
151 | 148 | | |
152 | 149 | | |
153 | 150 | | |
| |||
0 commit comments