@@ -202,99 +202,6 @@ describe('Sentry webpack plugin config', () => {
202
202
} ) ;
203
203
} ) ;
204
204
205
- describe ( "Sentry webpack plugin `include` option with basePath filled on next's config" , ( ) => {
206
- const exportedNextConfigWithBasePath = {
207
- ...exportedNextConfig ,
208
- basePath : '/city-park' ,
209
- } ;
210
-
211
- it ( 'has the correct value when building client bundles' , async ( ) => {
212
- const buildContext = getBuildContext ( 'client' , exportedNextConfigWithBasePath ) ;
213
- const finalWebpackConfig = await materializeFinalWebpackConfig ( {
214
- exportedNextConfig : exportedNextConfigWithBasePath ,
215
- incomingWebpackConfig : clientWebpackConfig ,
216
- incomingWebpackBuildContext : buildContext ,
217
- } ) ;
218
-
219
- const sentryWebpackPluginInstance = findWebpackPlugin (
220
- finalWebpackConfig ,
221
- 'SentryCliPlugin' ,
222
- ) as SentryWebpackPlugin ;
223
-
224
- expect ( sentryWebpackPluginInstance . options . include ) . toEqual ( [
225
- {
226
- paths : [ `${ buildContext . dir } /.next/static/chunks/pages` ] ,
227
- urlPrefix : '~/city-park/_next/static/chunks/pages' ,
228
- } ,
229
- ] ) ;
230
- } ) ;
231
-
232
- it ( 'has the correct value when building serverless server bundles' , async ( ) => {
233
- const exportedNextConfigServerless = {
234
- ...exportedNextConfigWithBasePath ,
235
- target : 'experimental-serverless-trace' as const ,
236
- } ;
237
- const buildContext = getBuildContext ( 'server' , exportedNextConfigServerless ) ;
238
-
239
- const finalWebpackConfig = await materializeFinalWebpackConfig ( {
240
- exportedNextConfig : exportedNextConfigServerless ,
241
- incomingWebpackConfig : serverWebpackConfig ,
242
- incomingWebpackBuildContext : buildContext ,
243
- } ) ;
244
-
245
- const sentryWebpackPluginInstance = findWebpackPlugin (
246
- finalWebpackConfig ,
247
- 'SentryCliPlugin' ,
248
- ) as SentryWebpackPlugin ;
249
-
250
- expect ( sentryWebpackPluginInstance . options . include ) . toEqual ( [
251
- { paths : [ `${ buildContext . dir } /.next/serverless/` ] , urlPrefix : '~/city-park/_next/serverless' } ,
252
- ] ) ;
253
- } ) ;
254
-
255
- it ( 'has the correct value when building serverful server bundles using webpack 4' , async ( ) => {
256
- const serverBuildContextWebpack4 = getBuildContext ( 'server' , exportedNextConfigWithBasePath ) ;
257
- serverBuildContextWebpack4 . webpack . version = '4.15.13' ;
258
-
259
- const finalWebpackConfig = await materializeFinalWebpackConfig ( {
260
- exportedNextConfig : exportedNextConfigWithBasePath ,
261
- incomingWebpackConfig : serverWebpackConfig ,
262
- incomingWebpackBuildContext : serverBuildContextWebpack4 ,
263
- } ) ;
264
-
265
- const sentryWebpackPluginInstance = findWebpackPlugin (
266
- finalWebpackConfig ,
267
- 'SentryCliPlugin' ,
268
- ) as SentryWebpackPlugin ;
269
-
270
- expect ( sentryWebpackPluginInstance . options . include ) . toEqual ( [
271
- {
272
- paths : [ `${ serverBuildContextWebpack4 . dir } /.next/server/pages/` ] ,
273
- urlPrefix : '~/city-park/_next/server/pages' ,
274
- } ,
275
- ] ) ;
276
- } ) ;
277
-
278
- it ( 'has the correct value when building serverful server bundles using webpack 5' , async ( ) => {
279
- const buildContext = getBuildContext ( 'server' , exportedNextConfigWithBasePath ) ;
280
- const finalWebpackConfig = await materializeFinalWebpackConfig ( {
281
- exportedNextConfig : exportedNextConfigWithBasePath ,
282
- incomingWebpackConfig : serverWebpackConfig ,
283
- incomingWebpackBuildContext : buildContext ,
284
- } ) ;
285
-
286
- const sentryWebpackPluginInstance = findWebpackPlugin (
287
- finalWebpackConfig ,
288
- 'SentryCliPlugin' ,
289
- ) as SentryWebpackPlugin ;
290
-
291
- expect ( sentryWebpackPluginInstance . options . include ) . toEqual ( [
292
- { paths : [ `${ buildContext . dir } /.next/server/pages/` ] , urlPrefix : '~/city-park/_next/server/pages' } ,
293
- { paths : [ `${ buildContext . dir } /.next/server/chunks/` ] , urlPrefix : '~/city-park/_next/server/chunks' } ,
294
- ] ) ;
295
- } ) ;
296
- } ) ;
297
-
298
205
describe ( 'SentryWebpackPlugin enablement' , ( ) => {
299
206
let processEnvBackup : typeof process . env ;
300
207
0 commit comments