11import { getSentryRelease } from '@sentry/node' ;
2- import { dropUndefinedKeys , logger } from '@sentry/utils' ;
2+ import { dropUndefinedKeys , isPlainObject , logger } from '@sentry/utils' ;
33import { default as SentryWebpackPlugin } from '@sentry/webpack-plugin' ;
44import * as fs from 'fs' ;
55import * as os from 'os' ;
@@ -290,6 +290,10 @@ export function getWebpackPluginOptions(
290290 isWebpack5 ? [ { paths : [ `${ distDir } /server/chunks/` ] , urlPrefix : `${ urlPrefix } /server/chunks` } ] : [ ] ,
291291 ) ;
292292
293+ const baseIgnore = [ '.next/cache' , 'server/ssr-module-cache.js' ] ;
294+ const serverIgnore = [ ] . concat ( isServerless ? [ ] : [ ] ) ;
295+ const clientIgnore = [ '**/*.css.map' , '**/_ssgManifest.js' , '**/_buildManifest.js' , 'static/chunks/framework-*.js' , ] ;
296+
293297 const clientInclude = [ { paths : [ `${ distDir } /static/chunks/pages` ] , urlPrefix : `${ urlPrefix } /static/chunks/pages` } ] ;
294298
295299 const defaultPluginOptions = dropUndefinedKeys ( {
@@ -311,3 +315,40 @@ export function getWebpackPluginOptions(
311315
312316 return { ...defaultPluginOptions , ...userPluginOptions } ;
313317}
318+
319+ function mergeIncludeValues ( defaultIncludes : string [ ] , userIncludes : string | string [ ] ) : string [ ] {
320+ if (
321+ userIncludes === undefined ||
322+ userIncludes === '' ||
323+ ( Array . isArray ( userIncludes ) && userIncludes . length === 0 ) ||
324+ ( isPlainObject ( userIncludes ) && Object . keys ( userIncludes ) . length === 0 )
325+ ) {
326+ return defaultIncludes ;
327+ }
328+
329+ const userIncludesArr = Array . isArray ( userIncludes ) ? userIncludes : [ userIncludes ] ;
330+ const mergedIncludes = [ ] ;
331+ // const defaultIncludesSet = new Set(defaultIncludes)
332+
333+ for ( const userInclude of userIncludesArr ) {
334+ if ( typeof userInclude === 'string' ) {
335+ if ( ! ( userInclude in defaultIncludes ) && ) {
336+ continue ;
337+ }
338+ if ( ) ) {
339+ }
340+ }
341+ }
342+ }
343+
344+ // ui = "things"
345+
346+ // ui = ["things", "stuff"]
347+
348+ // ui = {paths: ["things"], ...}
349+
350+ // ui = [{paths: [...]}, {}]
351+
352+ function hasOverlap ( userInclude : string , defaultIncludes : string [ ] ) : string | undefined {
353+
354+ }
0 commit comments