Skip to content

Commit 3e7797d

Browse files
committed
STASH
1 parent 1b39320 commit 3e7797d

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getSentryRelease } from '@sentry/node';
2-
import { dropUndefinedKeys, logger } from '@sentry/utils';
2+
import { dropUndefinedKeys, isPlainObject, logger } from '@sentry/utils';
33
import { default as SentryWebpackPlugin } from '@sentry/webpack-plugin';
44
import * as fs from 'fs';
55
import * 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

Comments
 (0)