next 15.4.2-canary.25 → 15.4.2-canary.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/handle-externals.js +4 -0
  3. package/dist/build/handle-externals.js.map +1 -1
  4. package/dist/build/index.js +2 -2
  5. package/dist/build/swc/index.js +1 -1
  6. package/dist/build/webpack/plugins/middleware-plugin.js +7 -3
  7. package/dist/build/webpack/plugins/middleware-plugin.js.map +1 -1
  8. package/dist/build/webpack-config.js +11 -2
  9. package/dist/build/webpack-config.js.map +1 -1
  10. package/dist/client/app-bootstrap.js +1 -1
  11. package/dist/client/index.js +1 -1
  12. package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js +1 -1
  13. package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
  14. package/dist/compiled/next-server/pages-api.runtime.prod.js +1 -1
  15. package/dist/compiled/next-server/pages-api.runtime.prod.js.map +1 -1
  16. package/dist/compiled/next-server/pages-turbo.runtime.dev.js +1 -1
  17. package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
  18. package/dist/compiled/next-server/pages.runtime.prod.js +1 -1
  19. package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
  20. package/dist/esm/build/handle-externals.js +4 -0
  21. package/dist/esm/build/handle-externals.js.map +1 -1
  22. package/dist/esm/build/index.js +2 -2
  23. package/dist/esm/build/swc/index.js +1 -1
  24. package/dist/esm/build/webpack/plugins/middleware-plugin.js +7 -3
  25. package/dist/esm/build/webpack/plugins/middleware-plugin.js.map +1 -1
  26. package/dist/esm/build/webpack-config.js +11 -2
  27. package/dist/esm/build/webpack-config.js.map +1 -1
  28. package/dist/esm/client/app-bootstrap.js +1 -1
  29. package/dist/esm/client/index.js +1 -1
  30. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  31. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  32. package/dist/esm/server/lib/app-info-log.js +1 -1
  33. package/dist/esm/server/lib/start-server.js +1 -1
  34. package/dist/esm/shared/lib/canary-only.js +1 -1
  35. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  36. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  37. package/dist/server/lib/app-info-log.js +1 -1
  38. package/dist/server/lib/start-server.js +1 -1
  39. package/dist/shared/lib/canary-only.js +1 -1
  40. package/dist/telemetry/anonymous-meta.js +1 -1
  41. package/dist/telemetry/events/session-stopped.js +2 -2
  42. package/dist/telemetry/events/version.js +2 -2
  43. package/package.json +15 -15
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/build/webpack-config.ts"],"sourcesContent":["import React from 'react'\nimport ReactRefreshWebpackPlugin from 'next/dist/compiled/@next/react-refresh-utils/dist/ReactRefreshWebpackPlugin'\nimport { yellow, bold } from '../lib/picocolors'\nimport crypto from 'crypto'\nimport { webpack } from 'next/dist/compiled/webpack/webpack'\nimport path from 'path'\n\nimport { getDefineEnv } from './define-env'\nimport { escapeStringRegexp } from '../shared/lib/escape-regexp'\nimport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES } from '../lib/constants'\nimport type { WebpackLayerName } from '../lib/constants'\nimport {\n isWebpackBundledLayer,\n isWebpackClientOnlyLayer,\n shouldUseReactServerCondition,\n isWebpackDefaultLayer,\n RSPACK_DEFAULT_LAYERS_REGEX,\n} from './utils'\nimport type { CustomRoutes } from '../lib/load-custom-routes.js'\nimport {\n CLIENT_STATIC_FILES_RUNTIME_AMP,\n CLIENT_STATIC_FILES_RUNTIME_MAIN,\n CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,\n CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL,\n CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,\n CLIENT_STATIC_FILES_RUNTIME_WEBPACK,\n MIDDLEWARE_REACT_LOADABLE_MANIFEST,\n REACT_LOADABLE_MANIFEST,\n SERVER_DIRECTORY,\n COMPILER_NAMES,\n} from '../shared/lib/constants'\nimport type { CompilerNameValues } from '../shared/lib/constants'\nimport { execOnce } from '../shared/lib/utils'\nimport type { NextConfigComplete } from '../server/config-shared'\nimport { finalizeEntrypoint } from './entries'\nimport * as Log from './output/log'\nimport { buildConfiguration } from './webpack/config'\nimport MiddlewarePlugin, {\n getEdgePolyfilledModules,\n handleWebpackExternalForEdgeRuntime,\n} from './webpack/plugins/middleware-plugin'\nimport BuildManifestPlugin from './webpack/plugins/build-manifest-plugin'\nimport { JsConfigPathsPlugin } from './webpack/plugins/jsconfig-paths-plugin'\nimport { DropClientPage } from './webpack/plugins/next-drop-client-page-plugin'\nimport PagesManifestPlugin from './webpack/plugins/pages-manifest-plugin'\nimport { ProfilingPlugin } from './webpack/plugins/profiling-plugin'\nimport { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin'\nimport { WellKnownErrorsPlugin } from './webpack/plugins/wellknown-errors-plugin'\nimport { regexLikeCss } from './webpack/config/blocks/css'\nimport { CopyFilePlugin } from './webpack/plugins/copy-file-plugin'\nimport { ClientReferenceManifestPlugin } from './webpack/plugins/flight-manifest-plugin'\nimport { FlightClientEntryPlugin as NextFlightClientEntryPlugin } from './webpack/plugins/flight-client-entry-plugin'\nimport { RspackFlightClientEntryPlugin } from './webpack/plugins/rspack-flight-client-entry-plugin'\nimport { NextTypesPlugin } from './webpack/plugins/next-types-plugin'\nimport type {\n Feature,\n SWC_TARGET_TRIPLE,\n} from './webpack/plugins/telemetry-plugin/telemetry-plugin'\nimport type { Span } from '../trace'\nimport type { MiddlewareMatcher } from './analysis/get-page-static-info'\nimport loadJsConfig, {\n type JsConfig,\n type ResolvedBaseUrl,\n} from './load-jsconfig'\nimport { loadBindings } from './swc'\nimport { AppBuildManifestPlugin } from './webpack/plugins/app-build-manifest-plugin'\nimport { SubresourceIntegrityPlugin } from './webpack/plugins/subresource-integrity-plugin'\nimport { NextFontManifestPlugin } from './webpack/plugins/next-font-manifest-plugin'\nimport { getSupportedBrowsers } from './utils'\nimport { MemoryWithGcCachePlugin } from './webpack/plugins/memory-with-gc-cache-plugin'\nimport { getBabelConfigFile } from './get-babel-config-file'\nimport { needsExperimentalReact } from '../lib/needs-experimental-react'\nimport type { SWCLoaderOptions } from './webpack/loaders/next-swc-loader'\nimport { isResourceInPackages, makeExternalHandler } from './handle-externals'\nimport {\n getMainField,\n edgeConditionNames,\n} from './webpack-config-rules/resolve'\nimport { OptionalPeerDependencyResolverPlugin } from './webpack/plugins/optional-peer-dependency-resolve-plugin'\nimport {\n createWebpackAliases,\n createServerOnlyClientOnlyAliases,\n createVendoredReactAliases,\n createNextApiEsmAliases,\n createAppRouterApiAliases,\n} from './create-compiler-aliases'\nimport { hasCustomExportOutput } from '../export/utils'\nimport { CssChunkingPlugin } from './webpack/plugins/css-chunking-plugin'\nimport {\n getBabelLoader,\n getReactCompilerLoader,\n} from './get-babel-loader-config'\nimport {\n NEXT_PROJECT_ROOT,\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n} from './next-dir-paths'\nimport { getRspackCore, getRspackReactRefresh } from '../shared/lib/get-rspack'\nimport { RspackProfilingPlugin } from './webpack/plugins/rspack-profiling-plugin'\nimport getWebpackBundler from '../shared/lib/get-webpack-bundler'\nimport type { NextBuildContext } from './build-context'\nimport type { RootParamsLoaderOpts } from './webpack/loaders/next-root-params-loader'\nimport type { InvalidImportLoaderOpts } from './webpack/loaders/next-invalid-import-error-loader'\n\ntype ExcludesFalse = <T>(x: T | false) => x is T\ntype ClientEntries = {\n [key: string]: string | string[]\n}\n\nconst EXTERNAL_PACKAGES =\n require('../lib/server-external-packages.json') as string[]\n\nconst DEFAULT_TRANSPILED_PACKAGES =\n require('../lib/default-transpiled-packages.json') as string[]\n\nif (parseInt(React.version) < 18) {\n throw new Error('Next.js requires react >= 18.2.0 to be installed.')\n}\n\nexport const babelIncludeRegexes: RegExp[] = [\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?shared[\\\\/]lib/,\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?client/,\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?pages/,\n /[\\\\/](strip-ansi|ansi-regex|styled-jsx)[\\\\/]/,\n]\n\nconst browserNonTranspileModules = [\n // Transpiling `process/browser` will trigger babel compilation error due to value replacement.\n // TypeError: Property left of AssignmentExpression expected node to be of a type [\"LVal\"] but instead got \"BooleanLiteral\"\n // e.g. `process.browser = true` will become `true = true`.\n /[\\\\/]node_modules[\\\\/]process[\\\\/]browser/,\n // Exclude precompiled react packages from browser compilation due to SWC helper insertion (#61791),\n // We fixed the issue but it's safer to exclude them from compilation since they don't need to be re-compiled.\n /[\\\\/]next[\\\\/]dist[\\\\/]compiled[\\\\/](react|react-dom|react-server-dom-webpack)(-experimental)?($|[\\\\/])/,\n]\nconst precompileRegex = /[\\\\/]next[\\\\/]dist[\\\\/]compiled[\\\\/]/\n\nconst asyncStoragesRegex =\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?server[\\\\/]app-render[\\\\/](work-async-storage|action-async-storage|dynamic-access-async-storage|work-unit-async-storage)/\n\n// Support for NODE_PATH\nconst nodePathList = (process.env.NODE_PATH || '')\n .split(process.platform === 'win32' ? ';' : ':')\n .filter((p) => !!p)\n\nconst baseWatchOptions: webpack.Configuration['watchOptions'] = Object.freeze({\n aggregateTimeout: 5,\n ignored:\n // Matches **/node_modules/**, **/.git/** and **/.next/**\n /^((?:[^/]*(?:\\/|$))*)(\\.(git|next)|node_modules)(\\/((?:[^/]*(?:\\/|$))*)(?:$|\\/))?/,\n})\n\nfunction isModuleCSS(module: { type: string }) {\n return (\n // mini-css-extract-plugin\n module.type === `css/mini-extract` ||\n // extract-css-chunks-webpack-plugin (old)\n module.type === `css/extract-chunks` ||\n // extract-css-chunks-webpack-plugin (new)\n module.type === `css/extract-css-chunks`\n )\n}\n\nconst devtoolRevertWarning = execOnce(\n (devtool: webpack.Configuration['devtool']) => {\n console.warn(\n yellow(bold('Warning: ')) +\n bold(`Reverting webpack devtool to '${devtool}'.\\n`) +\n 'Changing the webpack devtool in development mode will cause severe performance regressions.\\n' +\n 'Read more: https://nextjs.org/docs/messages/improper-devtool'\n )\n }\n)\n\nlet loggedSwcDisabled = false\nlet loggedIgnoredCompilerOptions = false\nconst reactRefreshLoaderName =\n 'next/dist/compiled/@next/react-refresh-utils/dist/loader'\n\nfunction getReactRefreshLoader() {\n return process.env.NEXT_RSPACK\n ? getRspackReactRefresh().loader\n : require.resolve(reactRefreshLoaderName)\n}\n\nexport function attachReactRefresh(\n webpackConfig: webpack.Configuration,\n targetLoader: webpack.RuleSetUseItem\n) {\n const reactRefreshLoader = getReactRefreshLoader()\n webpackConfig.module?.rules?.forEach((rule) => {\n if (rule && typeof rule === 'object' && 'use' in rule) {\n const curr = rule.use\n // When the user has configured `defaultLoaders.babel` for a input file:\n if (curr === targetLoader) {\n rule.use = [reactRefreshLoader, curr as webpack.RuleSetUseItem]\n } else if (\n Array.isArray(curr) &&\n curr.some((r) => r === targetLoader) &&\n // Check if loader already exists:\n !curr.some(\n (r) => r === reactRefreshLoader || r === reactRefreshLoaderName\n )\n ) {\n const idx = curr.findIndex((r) => r === targetLoader)\n // Clone to not mutate user input\n rule.use = [...curr]\n\n // inject / input: [other, babel] output: [other, refresh, babel]:\n rule.use.splice(idx, 0, reactRefreshLoader)\n }\n }\n })\n}\n\nexport const NODE_RESOLVE_OPTIONS = {\n dependencyType: 'commonjs',\n modules: ['node_modules'],\n fallback: false,\n exportsFields: ['exports'],\n importsFields: ['imports'],\n conditionNames: ['node', 'require'],\n descriptionFiles: ['package.json'],\n extensions: ['.js', '.json', '.node'],\n enforceExtensions: false,\n symlinks: true,\n mainFields: ['main'],\n mainFiles: ['index'],\n roots: [],\n fullySpecified: false,\n preferRelative: false,\n preferAbsolute: false,\n restrictions: [],\n}\n\nexport const NODE_BASE_RESOLVE_OPTIONS = {\n ...NODE_RESOLVE_OPTIONS,\n alias: false,\n}\n\nexport const NODE_ESM_RESOLVE_OPTIONS = {\n ...NODE_RESOLVE_OPTIONS,\n alias: false,\n dependencyType: 'esm',\n conditionNames: ['node', 'import'],\n fullySpecified: true,\n}\n\nexport const NODE_BASE_ESM_RESOLVE_OPTIONS = {\n ...NODE_ESM_RESOLVE_OPTIONS,\n alias: false,\n}\n\nexport const nextImageLoaderRegex =\n /\\.(png|jpg|jpeg|gif|webp|avif|ico|bmp|svg)$/i\n\nexport async function loadProjectInfo({\n dir,\n config,\n dev,\n}: {\n dir: string\n config: NextConfigComplete\n dev: boolean\n}): Promise<{\n jsConfig: JsConfig\n jsConfigPath?: string\n resolvedBaseUrl: ResolvedBaseUrl\n supportedBrowsers: string[] | undefined\n}> {\n const { jsConfig, jsConfigPath, resolvedBaseUrl } = await loadJsConfig(\n dir,\n config\n )\n const supportedBrowsers = getSupportedBrowsers(dir, dev)\n return {\n jsConfig,\n jsConfigPath,\n resolvedBaseUrl,\n supportedBrowsers,\n }\n}\n\nexport function hasExternalOtelApiPackage(): boolean {\n try {\n require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n return true\n } catch {\n return false\n }\n}\n\nconst UNSAFE_CACHE_REGEX = /[\\\\/]pages[\\\\/][^\\\\/]+(?:$|\\?|#)/\n\nexport function getCacheDirectories(\n configs: webpack.Configuration[]\n): Set<string> {\n return new Set(\n configs\n .map((cfg) => {\n if (typeof cfg.cache === 'object' && cfg.cache.type === 'filesystem') {\n return cfg.cache.cacheDirectory\n }\n return null\n })\n .filter((dir) => dir != null)\n )\n}\n\nexport default async function getBaseWebpackConfig(\n dir: string,\n {\n buildId,\n encryptionKey,\n config,\n compilerType,\n dev = false,\n entrypoints,\n isDevFallback = false,\n pagesDir,\n reactProductionProfiling = false,\n rewrites,\n originalRewrites,\n originalRedirects,\n runWebpackSpan,\n appDir,\n middlewareMatchers,\n noMangling,\n jsConfig,\n jsConfigPath,\n resolvedBaseUrl,\n supportedBrowsers,\n clientRouterFilters,\n fetchCacheKeyPrefix,\n isCompileMode,\n previewProps,\n }: {\n previewProps: NonNullable<(typeof NextBuildContext)['previewProps']>\n isCompileMode?: boolean\n buildId: string\n encryptionKey: string\n config: NextConfigComplete\n compilerType: CompilerNameValues\n dev?: boolean\n entrypoints: webpack.EntryObject\n isDevFallback?: boolean\n pagesDir: string | undefined\n reactProductionProfiling?: boolean\n rewrites: CustomRoutes['rewrites']\n originalRewrites: CustomRoutes['rewrites'] | undefined\n originalRedirects: CustomRoutes['redirects'] | undefined\n runWebpackSpan: Span\n appDir: string | undefined\n middlewareMatchers?: MiddlewareMatcher[]\n noMangling?: boolean\n jsConfig: any\n jsConfigPath?: string\n resolvedBaseUrl: ResolvedBaseUrl\n supportedBrowsers: string[] | undefined\n clientRouterFilters?: {\n staticFilter: ReturnType<\n import('../shared/lib/bloom-filter').BloomFilter['export']\n >\n dynamicFilter: ReturnType<\n import('../shared/lib/bloom-filter').BloomFilter['export']\n >\n }\n fetchCacheKeyPrefix?: string\n }\n): Promise<webpack.Configuration> {\n const bundler = getWebpackBundler()\n const isClient = compilerType === COMPILER_NAMES.client\n const isEdgeServer = compilerType === COMPILER_NAMES.edgeServer\n const isNodeServer = compilerType === COMPILER_NAMES.server\n\n const isRspack = Boolean(process.env.NEXT_RSPACK)\n\n const FlightClientEntryPlugin =\n isRspack && process.env.BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN\n ? RspackFlightClientEntryPlugin\n : NextFlightClientEntryPlugin\n\n // If the current compilation is aimed at server-side code instead of client-side code.\n const isNodeOrEdgeCompilation = isNodeServer || isEdgeServer\n\n const hasRewrites =\n rewrites.beforeFiles.length > 0 ||\n rewrites.afterFiles.length > 0 ||\n rewrites.fallback.length > 0\n\n const hasAppDir = !!appDir\n const disableOptimizedLoading = true\n const enableTypedRoutes = !!config.experimental.typedRoutes && hasAppDir\n const bundledReactChannel = needsExperimentalReact(config)\n ? '-experimental'\n : ''\n\n const babelConfigFile = getBabelConfigFile(dir)\n\n if (!dev && hasCustomExportOutput(config)) {\n config.distDir = '.next'\n }\n const distDir = path.join(dir, config.distDir)\n\n let useSWCLoader = !babelConfigFile || config.experimental.forceSwcTransforms\n let SWCBinaryTarget: [Feature, boolean] | undefined = undefined\n if (useSWCLoader) {\n // TODO: we do not collect wasm target yet\n const binaryTarget = (\n require('./swc') as typeof import('./swc')\n )?.getBinaryMetadata?.()?.target as SWC_TARGET_TRIPLE\n SWCBinaryTarget = binaryTarget\n ? [`swc/target/${binaryTarget}` as const, true]\n : undefined\n }\n\n if (!loggedSwcDisabled && !useSWCLoader && babelConfigFile) {\n Log.info(\n `Disabled SWC as replacement for Babel because of custom Babel configuration \"${path.relative(\n dir,\n babelConfigFile\n )}\" https://nextjs.org/docs/messages/swc-disabled`\n )\n loggedSwcDisabled = true\n }\n\n // eagerly load swc bindings instead of waiting for transform calls\n if (!babelConfigFile && isClient) {\n await loadBindings(config.experimental.useWasmBinary)\n }\n\n // since `pages` doesn't always bundle by default we need to\n // auto-include optimizePackageImports in transpilePackages\n const finalTranspilePackages: string[] = (\n config.transpilePackages || []\n ).concat(DEFAULT_TRANSPILED_PACKAGES)\n\n for (const pkg of config.experimental.optimizePackageImports || []) {\n if (!finalTranspilePackages.includes(pkg)) {\n finalTranspilePackages.push(pkg)\n }\n }\n\n if (!loggedIgnoredCompilerOptions && !useSWCLoader && config.compiler) {\n Log.info(\n '`compiler` options in `next.config.js` will be ignored while using Babel https://nextjs.org/docs/messages/ignored-compiler-options'\n )\n loggedIgnoredCompilerOptions = true\n }\n\n const excludeCache: Record<string, boolean> = {}\n function exclude(excludePath: string): boolean {\n const cached = excludeCache[excludePath]\n if (cached !== undefined) {\n return cached\n }\n\n const shouldExclude =\n excludePath.includes('node_modules') &&\n !babelIncludeRegexes.some((r) => r.test(excludePath)) &&\n !isResourceInPackages(excludePath, finalTranspilePackages)\n\n excludeCache[excludePath] = shouldExclude\n return shouldExclude\n }\n\n const shouldIncludeExternalDirs =\n config.experimental.externalDir || !!config.transpilePackages\n const codeCondition = {\n test: { or: [/\\.(tsx|ts|js|cjs|mjs|jsx)$/, /__barrel_optimize__/] },\n ...(shouldIncludeExternalDirs\n ? // Allowing importing TS/TSX files from outside of the root dir.\n {}\n : { include: [dir, ...babelIncludeRegexes] }),\n exclude,\n }\n\n const babelLoader = getBabelLoader(\n useSWCLoader,\n babelConfigFile,\n isNodeOrEdgeCompilation,\n distDir,\n pagesDir,\n dir,\n (appDir || pagesDir)!,\n dev,\n isClient,\n config.experimental?.reactCompiler,\n codeCondition.exclude\n )\n\n const reactCompilerLoader = babelLoader\n ? undefined\n : getReactCompilerLoader(\n config.experimental?.reactCompiler,\n dir,\n dev,\n isNodeOrEdgeCompilation,\n codeCondition.exclude\n )\n\n let swcTraceProfilingInitialized = false\n const getSwcLoader = (extraOptions: Partial<SWCLoaderOptions>) => {\n if (\n config?.experimental?.swcTraceProfiling &&\n !swcTraceProfilingInitialized\n ) {\n // This will init subscribers once only in a single process lifecycle,\n // even though it can be called multiple times.\n // Subscriber need to be initialized _before_ any actual swc's call (transform, etcs)\n // to collect correct trace spans when they are called.\n swcTraceProfilingInitialized = true\n ;(\n require('./swc') as typeof import('./swc')\n )?.initCustomTraceSubscriber?.(\n path.join(distDir, `swc-trace-profile-${Date.now()}.json`)\n )\n }\n\n const useBuiltinSwcLoader = process.env.BUILTIN_SWC_LOADER\n if (isRspack && useBuiltinSwcLoader) {\n return {\n loader: 'builtin:next-swc-loader',\n options: {\n isServer: isNodeOrEdgeCompilation,\n rootDir: dir,\n pagesDir,\n appDir,\n hasReactRefresh: dev && isClient,\n transpilePackages: finalTranspilePackages,\n supportedBrowsers,\n swcCacheDir: path.join(\n dir,\n config?.distDir ?? '.next',\n 'cache',\n 'swc'\n ),\n serverReferenceHashSalt: encryptionKey,\n\n // rspack specific options\n pnp: Boolean(process.versions.pnp),\n optimizeServerReact: Boolean(config.experimental.optimizeServerReact),\n modularizeImports: config.modularizeImports,\n decorators: Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n ),\n emitDecoratorMetadata: Boolean(\n jsConfig?.compilerOptions?.emitDecoratorMetadata\n ),\n regeneratorRuntimePath: require.resolve(\n 'next/dist/compiled/regenerator-runtime'\n ),\n\n ...extraOptions,\n },\n }\n }\n\n return {\n loader: 'next-swc-loader',\n options: {\n isServer: isNodeOrEdgeCompilation,\n compilerType,\n rootDir: dir,\n pagesDir,\n appDir,\n hasReactRefresh: dev && isClient,\n nextConfig: config,\n jsConfig,\n transpilePackages: finalTranspilePackages,\n supportedBrowsers,\n swcCacheDir: path.join(dir, config?.distDir ?? '.next', 'cache', 'swc'),\n serverReferenceHashSalt: encryptionKey,\n ...extraOptions,\n } satisfies SWCLoaderOptions,\n }\n }\n\n // RSC loaders, prefer ESM, set `esm` to true\n const swcServerLayerLoader = getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.reactServerComponents,\n esm: true,\n })\n const swcSSRLayerLoader = getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.serverSideRendering,\n esm: true,\n })\n const swcBrowserLayerLoader = getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.appPagesBrowser,\n esm: true,\n })\n // Default swc loaders for pages doesn't prefer ESM.\n const swcDefaultLoader = getSwcLoader({\n serverComponents: true,\n esm: false,\n })\n\n const defaultLoaders = {\n babel: useSWCLoader ? swcDefaultLoader : babelLoader!,\n }\n\n const appServerLayerLoaders = hasAppDir\n ? [\n // When using Babel, we will have to add the SWC loader\n // as an additional pass to handle RSC correctly.\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n swcServerLayerLoader,\n babelLoader,\n reactCompilerLoader,\n ].filter(Boolean)\n : []\n\n const instrumentLayerLoaders = [\n 'next-flight-loader',\n // When using Babel, we will have to add the SWC loader\n // as an additional pass to handle RSC correctly.\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n swcServerLayerLoader,\n babelLoader,\n ].filter(Boolean)\n\n const middlewareLayerLoaders = [\n 'next-flight-loader',\n // When using Babel, we will have to use SWC to do the optimization\n // for middleware to tree shake the unused default optimized imports like \"next/server\".\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.middleware,\n }),\n babelLoader,\n ].filter(Boolean)\n\n const reactRefreshLoaders = dev && isClient ? [getReactRefreshLoader()] : []\n\n // client components layers: SSR or browser\n const createClientLayerLoader = ({\n isBrowserLayer,\n reactRefresh,\n }: {\n isBrowserLayer: boolean\n reactRefresh: boolean\n }) => [\n ...(reactRefresh ? reactRefreshLoaders : []),\n {\n // This loader handles actions and client entries\n // in the client layer.\n loader: 'next-flight-client-module-loader',\n },\n ...(hasAppDir\n ? [\n // When using Babel, we will have to add the SWC loader\n // as an additional pass to handle RSC correctly.\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n isBrowserLayer ? swcBrowserLayerLoader : swcSSRLayerLoader,\n babelLoader,\n reactCompilerLoader,\n ].filter(Boolean)\n : []),\n ]\n\n const appBrowserLayerLoaders = createClientLayerLoader({\n isBrowserLayer: true,\n // reactRefresh for browser layer is applied conditionally to user-land source\n reactRefresh: false,\n })\n const appSSRLayerLoaders = createClientLayerLoader({\n isBrowserLayer: false,\n reactRefresh: true,\n })\n\n // Loader for API routes needs to be differently configured as it shouldn't\n // have RSC transpiler enabled, so syntax checks such as invalid imports won't\n // be performed.\n const apiRoutesLayerLoaders = useSWCLoader\n ? getSwcLoader({\n serverComponents: false,\n bundleLayer: WEBPACK_LAYERS.apiNode,\n })\n : defaultLoaders.babel\n\n const pageExtensions = config.pageExtensions\n\n const outputPath = isNodeOrEdgeCompilation\n ? path.join(distDir, SERVER_DIRECTORY)\n : distDir\n\n const reactServerCondition = [\n 'react-server',\n ...(isEdgeServer ? edgeConditionNames : []),\n // inherits the default conditions\n '...',\n ]\n\n const reactRefreshEntry = isRspack\n ? getRspackReactRefresh().entry\n : require.resolve(\n `next/dist/compiled/@next/react-refresh-utils/dist/runtime`\n )\n\n const clientEntries = isClient\n ? ({\n // Backwards compatibility\n 'main.js': [],\n ...(dev\n ? {\n [CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH]: reactRefreshEntry,\n [CLIENT_STATIC_FILES_RUNTIME_AMP]:\n `./` +\n path\n .relative(\n dir,\n path.join(NEXT_PROJECT_ROOT_DIST_CLIENT, 'dev', 'amp-dev')\n )\n .replace(/\\\\/g, '/'),\n }\n : {}),\n [CLIENT_STATIC_FILES_RUNTIME_MAIN]:\n `./` +\n path\n .relative(\n dir,\n path.join(\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n dev ? `next-dev.js` : 'next.js'\n )\n )\n .replace(/\\\\/g, '/'),\n ...(hasAppDir\n ? {\n [CLIENT_STATIC_FILES_RUNTIME_MAIN_APP]: dev\n ? [\n reactRefreshEntry,\n `./` +\n path\n .relative(\n dir,\n path.join(\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n 'app-next-dev.js'\n )\n )\n .replace(/\\\\/g, '/'),\n ]\n : [\n `./` +\n path\n .relative(\n dir,\n path.join(\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n 'app-next.js'\n )\n )\n .replace(/\\\\/g, '/'),\n ],\n }\n : {}),\n } satisfies ClientEntries)\n : undefined\n\n const resolveConfig: webpack.Configuration['resolve'] = {\n // Disable .mjs for node_modules bundling\n extensions: ['.js', '.mjs', '.tsx', '.ts', '.jsx', '.json', '.wasm'],\n extensionAlias: config.experimental.extensionAlias,\n modules: [\n 'node_modules',\n ...nodePathList, // Support for NODE_PATH environment variable\n ],\n alias: createWebpackAliases({\n distDir,\n isClient,\n isEdgeServer,\n dev,\n config,\n pagesDir,\n appDir,\n dir,\n reactProductionProfiling,\n }),\n ...(isClient\n ? {\n fallback: {\n process: require.resolve('./polyfills/process'),\n },\n }\n : undefined),\n // default main fields use pages dir ones, and customize app router ones in loaders.\n mainFields: getMainField(compilerType, false),\n ...(isEdgeServer && {\n conditionNames: edgeConditionNames,\n }),\n plugins: [\n isNodeServer ? new OptionalPeerDependencyResolverPlugin() : undefined,\n ].filter(Boolean) as webpack.ResolvePluginInstance[],\n ...((isRspack && jsConfigPath\n ? {\n // Skip paths that are routed to a .d.ts file\n restrictions: [/^(?!.*\\.d\\.ts$).*$/],\n tsConfig: {\n configFile: jsConfigPath,\n },\n }\n : {}) as any),\n }\n\n // Packages which will be split into the 'framework' chunk.\n // Only top-level packages are included, e.g. nested copies like\n // 'node_modules/meow/node_modules/object-assign' are not included.\n const nextFrameworkPaths: string[] = []\n const topLevelFrameworkPaths: string[] = []\n const visitedFrameworkPackages = new Set<string>()\n // Adds package-paths of dependencies recursively\n const addPackagePath = (\n packageName: string,\n relativeToPath: string,\n paths: string[]\n ) => {\n try {\n if (visitedFrameworkPackages.has(packageName)) {\n return\n }\n visitedFrameworkPackages.add(packageName)\n\n const packageJsonPath = require.resolve(`${packageName}/package.json`, {\n paths: [relativeToPath],\n })\n\n // Include a trailing slash so that a `.startsWith(packagePath)` check avoids false positives\n // when one package name starts with the full name of a different package.\n // For example:\n // \"node_modules/react-slider\".startsWith(\"node_modules/react\") // true\n // \"node_modules/react-slider\".startsWith(\"node_modules/react/\") // false\n const directory = path.join(packageJsonPath, '../')\n\n // Returning from the function in case the directory has already been added and traversed\n if (paths.includes(directory)) return\n paths.push(directory)\n const dependencies = require(packageJsonPath).dependencies || {}\n for (const name of Object.keys(dependencies)) {\n addPackagePath(name, directory, paths)\n }\n } catch (_) {\n // don't error on failing to resolve framework packages\n }\n }\n\n for (const packageName of [\n 'react',\n 'react-dom',\n ...(hasAppDir\n ? [\n `next/dist/compiled/react${bundledReactChannel}`,\n `next/dist/compiled/react-dom${bundledReactChannel}`,\n ]\n : []),\n ]) {\n addPackagePath(packageName, dir, topLevelFrameworkPaths)\n }\n addPackagePath('next', dir, nextFrameworkPaths)\n\n const crossOrigin = config.crossOrigin\n\n // The `serverExternalPackages` should not conflict with\n // the `transpilePackages`.\n if (config.serverExternalPackages && finalTranspilePackages) {\n const externalPackageConflicts = finalTranspilePackages.filter((pkg) =>\n config.serverExternalPackages?.includes(pkg)\n )\n if (externalPackageConflicts.length > 0) {\n throw new Error(\n `The packages specified in the 'transpilePackages' conflict with the 'serverExternalPackages': ${externalPackageConflicts.join(\n ', '\n )}`\n )\n }\n }\n\n // For original request, such as `package name`\n const optOutBundlingPackages = EXTERNAL_PACKAGES.concat(\n ...(config.serverExternalPackages || [])\n ).filter((pkg) => !finalTranspilePackages?.includes(pkg))\n // For resolved request, such as `absolute path/package name/foo/bar.js`\n const optOutBundlingPackageRegex = new RegExp(\n `[/\\\\\\\\]node_modules[/\\\\\\\\](${optOutBundlingPackages\n .map((p) => p.replace(/\\//g, '[/\\\\\\\\]'))\n .join('|')})[/\\\\\\\\]`\n )\n\n const transpilePackagesRegex = new RegExp(\n `[/\\\\\\\\]node_modules[/\\\\\\\\](${finalTranspilePackages\n ?.map((p) => p.replace(/\\//g, '[/\\\\\\\\]'))\n .join('|')})[/\\\\\\\\]`\n )\n\n const handleExternals = makeExternalHandler({\n config,\n optOutBundlingPackageRegex,\n transpiledPackages: finalTranspilePackages,\n dir,\n })\n\n const pageExtensionsRegex = new RegExp(`\\\\.(${pageExtensions.join('|')})$`)\n\n const aliasCodeConditionTest = [codeCondition.test, pageExtensionsRegex]\n\n const builtinModules = (require('module') as typeof import('module'))\n .builtinModules\n\n const shouldEnableSlowModuleDetection =\n !!config.experimental.slowModuleDetection && dev\n\n const getParallelism = () => {\n const override = Number(process.env.NEXT_WEBPACK_PARALLELISM)\n if (shouldEnableSlowModuleDetection) {\n if (override) {\n console.warn(\n 'NEXT_WEBPACK_PARALLELISM is specified but will be ignored due to experimental.slowModuleDetection being enabled.'\n )\n }\n return 1\n }\n return override || undefined\n }\n\n const telemetryPlugin =\n !dev &&\n isClient &&\n new (\n require('./webpack/plugins/telemetry-plugin/telemetry-plugin') as typeof import('./webpack/plugins/telemetry-plugin/telemetry-plugin')\n ).TelemetryPlugin(\n new Map(\n [\n ['swcLoader', useSWCLoader],\n ['swcRelay', !!config.compiler?.relay],\n ['swcStyledComponents', !!config.compiler?.styledComponents],\n [\n 'swcReactRemoveProperties',\n !!config.compiler?.reactRemoveProperties,\n ],\n [\n 'swcExperimentalDecorators',\n !!jsConfig?.compilerOptions?.experimentalDecorators,\n ],\n ['swcRemoveConsole', !!config.compiler?.removeConsole],\n ['swcImportSource', !!jsConfig?.compilerOptions?.jsxImportSource],\n ['swcEmotion', !!config.compiler?.emotion],\n ['transpilePackages', !!config.transpilePackages],\n ['skipMiddlewareUrlNormalize', !!config.skipMiddlewareUrlNormalize],\n ['skipTrailingSlashRedirect', !!config.skipTrailingSlashRedirect],\n ['modularizeImports', !!config.modularizeImports],\n // If esmExternals is not same as default value, it represents customized usage\n ['esmExternals', config.experimental.esmExternals !== true],\n SWCBinaryTarget,\n ].filter<[Feature, boolean]>(Boolean as any)\n )\n )\n\n let webpackConfig: webpack.Configuration = {\n parallelism: getParallelism(),\n ...(isNodeServer ? { externalsPresets: { node: true } } : {}),\n // @ts-ignore\n externals:\n isClient || isEdgeServer\n ? // make sure importing \"next\" is handled gracefully for client\n // bundles in case a user imported types and it wasn't removed\n // TODO: should we warn/error for this instead?\n [\n 'next',\n ...(isEdgeServer\n ? [\n {\n '@builder.io/partytown': '{}',\n 'next/dist/compiled/etag': '{}',\n },\n getEdgePolyfilledModules(),\n handleWebpackExternalForEdgeRuntime,\n ]\n : []),\n ]\n : [\n ...builtinModules,\n ({\n context,\n request,\n dependencyType,\n contextInfo,\n getResolve,\n }: {\n context: string\n request: string\n dependencyType: string\n contextInfo: {\n issuer: string\n issuerLayer: string | null\n compiler: string\n }\n getResolve: (\n options: any\n ) => (\n resolveContext: string,\n resolveRequest: string,\n callback: (\n err?: Error,\n result?: string,\n resolveData?: { descriptionFileData?: { type?: any } }\n ) => void\n ) => void\n }) =>\n handleExternals(\n context,\n request,\n dependencyType,\n contextInfo.issuerLayer as WebpackLayerName,\n (options) => {\n const resolveFunction = getResolve(options)\n return (resolveContext: string, requestToResolve: string) =>\n new Promise((resolve, reject) => {\n resolveFunction(\n resolveContext,\n requestToResolve,\n (err, result, resolveData) => {\n if (err) return reject(err)\n if (!result) return resolve([null, false])\n const isEsm = /\\.js$/i.test(result)\n ? resolveData?.descriptionFileData?.type ===\n 'module'\n : /\\.mjs$/i.test(result)\n resolve([result, isEsm])\n }\n )\n })\n }\n ),\n ],\n\n optimization: {\n emitOnErrors: !dev,\n checkWasmTypes: false,\n nodeEnv: false,\n\n splitChunks: (():\n | Required<webpack.Configuration>['optimization']['splitChunks']\n | false => {\n // server chunking\n if (dev) {\n if (isNodeServer) {\n /*\n In development, we want to split code that comes from `node_modules` into their own chunks.\n This is because in development, we often need to reload the user bundle due to changes in the code.\n To work around this, we put all the vendor code into separate chunks so that we don't need to reload them.\n This is safe because the vendor code doesn't change between reloads.\n */\n const extractRootNodeModule = (modulePath: string) => {\n // This regex is used to extract the root node module name to be used as the chunk group name.\n // example: ../../node_modules/.pnpm/next@10/foo/node_modules/bar -> next@10\n const regex =\n /node_modules(?:\\/|\\\\)\\.?(?:pnpm(?:\\/|\\\\))?([^/\\\\]+)/\n const match = modulePath.match(regex)\n return match ? match[1] : null\n }\n return {\n cacheGroups: {\n // this chunk configuration gives us a separate chunk for each top level module in node_modules\n // or a hashed chunk if we can't extract the module name.\n vendor: {\n chunks: 'all',\n reuseExistingChunk: true,\n test: /[\\\\/]node_modules[\\\\/]/,\n minSize: 0,\n minChunks: 1,\n maxAsyncRequests: 300,\n maxInitialRequests: 300,\n name: (module: webpack.Module) => {\n const moduleId = module.nameForCondition()!\n const rootModule = extractRootNodeModule(moduleId)\n if (rootModule) {\n return `vendor-chunks/${rootModule}`\n } else {\n const hash = crypto.createHash('sha1').update(moduleId)\n hash.update(moduleId)\n return `vendor-chunks/${hash.digest('hex')}`\n }\n },\n },\n // disable the default chunk groups\n default: false,\n defaultVendors: false,\n },\n }\n }\n\n return false\n }\n\n if (isNodeServer || isEdgeServer) {\n return {\n filename: `${isEdgeServer ? `edge-chunks/` : ''}[name].js`,\n chunks: 'all',\n minChunks: 2,\n }\n }\n\n const frameworkCacheGroup = {\n chunks: 'all' as const,\n name: 'framework',\n // Ensures the framework chunk is not created for App Router.\n layer: isWebpackDefaultLayer,\n test(module: any) {\n const resource = module.nameForCondition?.()\n return resource\n ? topLevelFrameworkPaths.some((pkgPath) =>\n resource.startsWith(pkgPath)\n )\n : false\n },\n priority: 40,\n // Don't let webpack eliminate this chunk (prevents this chunk from\n // becoming a part of the commons chunk)\n enforce: true,\n }\n\n const libCacheGroup = {\n test(module: {\n type: string\n size: Function\n nameForCondition: Function\n }): boolean {\n return (\n !module.type?.startsWith('css') &&\n module.size() > 160000 &&\n /node_modules[/\\\\]/.test(module.nameForCondition() || '')\n )\n },\n name(module: {\n layer: string | null | undefined\n type: string\n libIdent?: Function\n updateHash: (hash: crypto.Hash) => void\n }): string {\n const hash = crypto.createHash('sha1')\n if (isModuleCSS(module)) {\n module.updateHash(hash)\n } else {\n if (!module.libIdent) {\n throw new Error(\n `Encountered unknown module type: ${module.type}. Please open an issue.`\n )\n }\n hash.update(module.libIdent({ context: dir }))\n }\n\n // Ensures the name of the chunk is not the same between two modules in different layers\n // E.g. if you import 'button-library' in App Router and Pages Router we don't want these to be bundled in the same chunk\n // as they're never used on the same page.\n if (module.layer) {\n hash.update(module.layer)\n }\n\n return hash.digest('hex').substring(0, 8)\n },\n priority: 30,\n minChunks: 1,\n reuseExistingChunk: true,\n }\n\n // client chunking\n return {\n // Keep main and _app chunks unsplitted in webpack 5\n // as we don't need a separate vendor chunk from that\n // and all other chunk depend on them so there is no\n // duplication that need to be pulled out.\n chunks: isRspack\n ? // using a function here causes noticable slowdown\n // in rspack\n /(?!polyfills|main|pages\\/_app)/\n : (chunk: any) =>\n !/^(polyfills|main|pages\\/_app)$/.test(chunk.name),\n\n cacheGroups: isRspack\n ? {\n framework: {\n chunks: 'all' as const,\n name: 'framework',\n layer: RSPACK_DEFAULT_LAYERS_REGEX,\n test: /[/]node_modules[/](react|react-dom|next[/]dist[/]compiled[/](react|react-dom)(-experimental)?)[/]/,\n priority: 40,\n enforce: true,\n },\n lib: {\n test: /[/]node_modules[/](?!.*\\.(css|scss|sass|less|styl)$)/,\n name: 'lib',\n chunks: 'all',\n priority: 30,\n minChunks: 1,\n reuseExistingChunk: true,\n },\n }\n : {\n framework: frameworkCacheGroup,\n lib: libCacheGroup,\n },\n maxInitialRequests: 25,\n minSize: 20000,\n }\n })(),\n runtimeChunk: isClient\n ? { name: CLIENT_STATIC_FILES_RUNTIME_WEBPACK }\n : undefined,\n\n minimize:\n !dev &&\n (isClient ||\n isEdgeServer ||\n (isNodeServer && config.experimental.serverMinification)),\n minimizer: [\n // Minify JavaScript\n isRspack\n ? new (getRspackCore().SwcJsMinimizerRspackPlugin)({\n // JS minimizer configuration\n // options should align with crates/napi/src/minify.rs#patch_opts\n minimizerOptions: {\n compress: {\n inline: 2,\n global_defs: {\n 'process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE': false,\n },\n },\n mangle: !noMangling && {\n reserved: ['AbortSignal'],\n disableCharFreq: !isClient,\n },\n },\n })\n : (compiler: webpack.Compiler) => {\n // @ts-ignore No typings yet\n const { MinifyPlugin } =\n require('./webpack/plugins/minify-webpack-plugin/src') as typeof import('./webpack/plugins/minify-webpack-plugin/src')\n new MinifyPlugin({\n noMangling,\n disableCharFreq: !isClient,\n }).apply(compiler)\n },\n // Minify CSS\n // By default, Rspack uses LightningCSS for CSS minification.\n // Rspack uses css-minimizer-plugin by default for compatibility.\n isRspack &&\n (process.env.__NEXT_TEST_MODE\n ? config.experimental.useLightningcss\n : config.experimental?.useLightningcss === undefined ||\n config.experimental.useLightningcss)\n ? new (getRspackCore().LightningCssMinimizerRspackPlugin)({\n // CSS minimizer configuration\n minimizerOptions: {\n targets: supportedBrowsers,\n },\n })\n : (compiler: webpack.Compiler) => {\n const { CssMinimizerPlugin } =\n require('./webpack/plugins/css-minimizer-plugin') as typeof import('./webpack/plugins/css-minimizer-plugin')\n new CssMinimizerPlugin({\n postcssOptions: {\n map: {\n // `inline: false` generates the source map in a separate file.\n // Otherwise, the CSS file is needlessly large.\n inline: false,\n // `annotation: false` skips appending the `sourceMappingURL`\n // to the end of the CSS file. Webpack already handles this.\n annotation: false,\n },\n },\n }).apply(compiler)\n },\n ],\n },\n context: dir,\n // Kept as function to be backwards compatible\n entry: async () => {\n return {\n ...(clientEntries ? clientEntries : {}),\n ...entrypoints,\n }\n },\n watchOptions: Object.freeze({\n ...baseWatchOptions,\n poll: config.watchOptions?.pollIntervalMs,\n }),\n output: {\n // we must set publicPath to an empty value to override the default of\n // auto which doesn't work in IE11\n publicPath: `${\n config.assetPrefix\n ? config.assetPrefix.endsWith('/')\n ? config.assetPrefix.slice(0, -1)\n : config.assetPrefix\n : ''\n }/_next/`,\n path: !dev && isNodeServer ? path.join(outputPath, 'chunks') : outputPath,\n // On the server we don't use hashes\n filename: isNodeOrEdgeCompilation\n ? dev || isEdgeServer\n ? `[name].js`\n : `../[name].js`\n : `static/chunks/${isDevFallback ? 'fallback/' : ''}[name]${\n dev ? '' : '-[contenthash]'\n }.js`,\n library: isClient || isEdgeServer ? '_N_E' : undefined,\n libraryTarget: isClient || isEdgeServer ? 'assign' : 'commonjs2',\n hotUpdateChunkFilename: 'static/webpack/[id].[fullhash].hot-update.js',\n hotUpdateMainFilename:\n 'static/webpack/[fullhash].[runtime].hot-update.json',\n // This saves chunks with the name given via `import()`\n chunkFilename: isNodeOrEdgeCompilation\n ? '[name].js'\n : `static/chunks/${isDevFallback ? 'fallback/' : ''}${\n dev ? '[name]' : '[name].[contenthash]'\n }.js`,\n strictModuleExceptionHandling: true,\n crossOriginLoading: crossOrigin,\n // if `sources[number]` is not an absolute path, it's is resolved\n // relative to the location of the source map file (https://tc39.es/source-map/#resolving-sources).\n // However, Webpack's `resource-path` is relative to the app dir.\n // TODO: Either `sourceRoot` should be populated with the root and then we can use `[resource-path]`\n // or we need a way to resolve return `path.relative(sourceMapLocation, info.resourcePath)`\n devtoolModuleFilenameTemplate: dev\n ? '[absolute-resource-path]'\n : undefined,\n webassemblyModuleFilename: 'static/wasm/[modulehash].wasm',\n hashFunction: 'xxhash64',\n hashDigestLength: 16,\n },\n performance: false,\n resolve: resolveConfig,\n resolveLoader: {\n // The loaders Next.js provides\n alias: [\n 'error-loader',\n 'next-swc-loader',\n 'next-client-pages-loader',\n 'next-image-loader',\n 'next-metadata-image-loader',\n 'next-style-loader',\n 'next-flight-loader',\n 'next-flight-client-entry-loader',\n 'next-flight-action-entry-loader',\n 'next-flight-client-module-loader',\n 'next-flight-server-reference-proxy-loader',\n 'empty-loader',\n 'next-middleware-loader',\n 'next-edge-function-loader',\n 'next-edge-app-route-loader',\n 'next-edge-ssr-loader',\n 'next-middleware-asset-loader',\n 'next-middleware-wasm-loader',\n 'next-app-loader',\n 'next-route-loader',\n 'next-font-loader',\n 'next-invalid-import-error-loader',\n 'next-metadata-route-loader',\n 'modularize-import-loader',\n 'next-barrel-loader',\n 'next-error-browser-binary-loader',\n 'next-root-params-loader',\n ].reduce(\n (alias, loader) => {\n // using multiple aliases to replace `resolveLoader.modules`\n alias[loader] = path.join(__dirname, 'webpack', 'loaders', loader)\n\n return alias\n },\n {} as Record<string, string>\n ),\n modules: [\n 'node_modules',\n ...nodePathList, // Support for NODE_PATH environment variable\n ],\n plugins: [],\n },\n module: {\n rules: [\n // Alias server-only and client-only to proper exports based on bundling layers\n {\n issuerLayer: {\n or: [\n ...WEBPACK_LAYERS.GROUP.serverOnly,\n ...WEBPACK_LAYERS.GROUP.neutralTarget,\n ],\n },\n resolve: {\n // Error on client-only but allow server-only\n alias: createServerOnlyClientOnlyAliases(true),\n },\n },\n {\n issuerLayer: {\n not: [\n ...WEBPACK_LAYERS.GROUP.serverOnly,\n ...WEBPACK_LAYERS.GROUP.neutralTarget,\n ],\n },\n resolve: {\n // Error on server-only but allow client-only\n alias: createServerOnlyClientOnlyAliases(false),\n },\n },\n // Detect server-only / client-only imports and error in build time\n {\n test: [\n /^client-only$/,\n /next[\\\\/]dist[\\\\/]compiled[\\\\/]client-only[\\\\/]error/,\n ],\n loader: 'next-invalid-import-error-loader',\n issuerLayer: {\n or: WEBPACK_LAYERS.GROUP.serverOnly,\n },\n options: {\n message:\n \"'client-only' cannot be imported from a Server Component module. It should only be used from a Client Component.\",\n },\n },\n {\n test: [\n /^server-only$/,\n /next[\\\\/]dist[\\\\/]compiled[\\\\/]server-only[\\\\/]index/,\n ],\n loader: 'next-invalid-import-error-loader',\n issuerLayer: {\n not: [\n ...WEBPACK_LAYERS.GROUP.serverOnly,\n ...WEBPACK_LAYERS.GROUP.neutralTarget,\n ],\n },\n options: {\n message:\n \"'server-only' cannot be imported from a Client Component module. It should only be used from a Server Component.\",\n },\n },\n // Potential the bundle introduced into middleware and api can be poisoned by client-only\n // but not being used, so we disabled the `client-only` erroring on these layers.\n // `server-only` is still available.\n {\n test: [\n /^client-only$/,\n /next[\\\\/]dist[\\\\/]compiled[\\\\/]client-only[\\\\/]error/,\n ],\n loader: 'empty-loader',\n issuerLayer: {\n or: WEBPACK_LAYERS.GROUP.neutralTarget,\n },\n },\n ...(isNodeServer\n ? []\n : [\n {\n test: /[\\\\/].*?\\.node$/,\n loader: 'next-error-browser-binary-loader',\n },\n ]),\n ...(hasAppDir\n ? [\n {\n // Make sure that AsyncLocalStorage module instance is shared between server and client\n // layers.\n layer: WEBPACK_LAYERS.shared,\n test: asyncStoragesRegex,\n },\n // Convert metadata routes to separate layer\n {\n resourceQuery: new RegExp(\n WEBPACK_RESOURCE_QUERIES.metadataRoute\n ),\n layer: WEBPACK_LAYERS.reactServerComponents,\n },\n {\n // Ensure that the app page module is in the client layers, this\n // enables React to work correctly for RSC.\n layer: WEBPACK_LAYERS.serverSideRendering,\n test: /next[\\\\/]dist[\\\\/](esm[\\\\/])?server[\\\\/]route-modules[\\\\/]app-page[\\\\/]module/,\n },\n {\n issuerLayer: isWebpackBundledLayer,\n resolve: {\n alias: createNextApiEsmAliases(),\n },\n },\n {\n issuerLayer: shouldUseReactServerCondition,\n resolve: {\n alias: createAppRouterApiAliases(true),\n },\n },\n {\n issuerLayer: isWebpackClientOnlyLayer,\n resolve: {\n alias: createAppRouterApiAliases(false),\n },\n },\n ]\n : []),\n ...(hasAppDir && !isClient\n ? [\n {\n issuerLayer: shouldUseReactServerCondition,\n test: {\n // Resolve it if it is a source code file, and it has NOT been\n // opted out of bundling.\n and: [\n aliasCodeConditionTest,\n {\n not: [optOutBundlingPackageRegex, asyncStoragesRegex],\n },\n ],\n },\n resourceQuery: {\n // Do not apply next-flight-loader to imports generated by the\n // next-metadata-image-loader, to avoid generating unnecessary\n // and conflicting entries in the flight client entry plugin.\n // These are already covered by the next-metadata-route-loader\n // entries.\n not: [\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadata),\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadataImageMeta),\n ],\n },\n resolve: {\n mainFields: getMainField(compilerType, true),\n conditionNames: reactServerCondition,\n // If missing the alias override here, the default alias will be used which aliases\n // react to the direct file path, not the package name. In that case the condition\n // will be ignored completely.\n alias: createVendoredReactAliases(bundledReactChannel, {\n // No server components profiling\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.reactServerComponents,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n use: 'next-flight-loader',\n },\n ]\n : []),\n\n ...getNextRootParamsRules({\n isRootParamsEnabled:\n config.experimental.rootParams ??\n // `experimental.dynamicIO` implies `experimental.rootParams`.\n config.experimental.cacheComponents ??\n false,\n isClient,\n appDir,\n pageExtensions,\n }),\n\n // TODO: FIXME: do NOT webpack 5 support with this\n // x-ref: https://github.com/webpack/webpack/issues/11467\n ...(!config.experimental.fullySpecified\n ? [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n } as any,\n ]\n : []),\n ...(hasAppDir && isEdgeServer\n ? [\n // The Edge bundle includes the server in its entrypoint, so it has to\n // be in the SSR layer — here we convert the actual page request to\n // the RSC layer via a webpack rule.\n {\n resourceQuery: new RegExp(\n WEBPACK_RESOURCE_QUERIES.edgeSSREntry\n ),\n layer: WEBPACK_LAYERS.reactServerComponents,\n },\n ]\n : []),\n ...(hasAppDir\n ? [\n {\n // Alias react-dom for ReactDOM.preload usage.\n // Alias react for switching between default set and share subset.\n oneOf: [\n {\n issuerLayer: shouldUseReactServerCondition,\n test: {\n // Resolve it if it is a source code file, and it has NOT been\n // opted out of bundling.\n and: [\n aliasCodeConditionTest,\n {\n not: [optOutBundlingPackageRegex, asyncStoragesRegex],\n },\n ],\n },\n resolve: {\n // It needs `conditionNames` here to require the proper asset,\n // when react is acting as dependency of compiled/react-dom.\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.reactServerComponents,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n {\n test: aliasCodeConditionTest,\n issuerLayer: WEBPACK_LAYERS.serverSideRendering,\n resolve: {\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.serverSideRendering,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n ],\n },\n {\n test: aliasCodeConditionTest,\n issuerLayer: WEBPACK_LAYERS.appPagesBrowser,\n resolve: {\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.appPagesBrowser,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n ]\n : []),\n // Do not apply react-refresh-loader to node_modules for app router browser layer\n ...(hasAppDir && dev && isClient\n ? [\n {\n test: codeCondition.test,\n exclude: [\n // exclude unchanged modules from react-refresh\n codeCondition.exclude,\n transpilePackagesRegex,\n precompileRegex,\n ],\n issuerLayer: WEBPACK_LAYERS.appPagesBrowser,\n use: reactRefreshLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n },\n },\n ]\n : []),\n {\n oneOf: [\n {\n ...codeCondition,\n issuerLayer: WEBPACK_LAYERS.apiNode,\n use: apiRoutesLayerLoaders,\n // In Node.js, switch back to normal URL handling.\n // We won't bundle `new URL()` cases in Node.js bundler layer.\n parser: {\n url: true,\n },\n },\n {\n ...codeCondition,\n issuerLayer: WEBPACK_LAYERS.apiEdge,\n use: apiRoutesLayerLoaders,\n // In Edge runtime, we leave the url handling by default.\n // The new URL assets will be converted into edge assets through assets loader.\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.middleware,\n use: middlewareLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n conditionNames: reactServerCondition,\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.middleware,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.instrument,\n use: instrumentLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n conditionNames: reactServerCondition,\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.instrument,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n ...(hasAppDir\n ? [\n {\n test: codeCondition.test,\n issuerLayer: shouldUseReactServerCondition,\n exclude: asyncStoragesRegex,\n use: appServerLayerLoaders,\n },\n {\n test: codeCondition.test,\n resourceQuery: new RegExp(\n WEBPACK_RESOURCE_QUERIES.edgeSSREntry\n ),\n use: appServerLayerLoaders,\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.appPagesBrowser,\n // Exclude the transpilation of the app layer due to compilation issues\n exclude: browserNonTranspileModules,\n use: appBrowserLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n },\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.serverSideRendering,\n exclude: asyncStoragesRegex,\n use: appSSRLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n },\n },\n ]\n : []),\n {\n ...codeCondition,\n use: [\n ...reactRefreshLoaders,\n defaultLoaders.babel,\n reactCompilerLoader,\n ].filter(Boolean),\n },\n ],\n },\n\n ...(!config.images.disableStaticImages\n ? [\n {\n test: nextImageLoaderRegex,\n loader: 'next-image-loader',\n issuer: { not: regexLikeCss },\n dependency: { not: ['url'] },\n resourceQuery: {\n not: [\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadata),\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadataRoute),\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadataImageMeta),\n ],\n },\n options: {\n isDev: dev,\n compilerType,\n basePath: config.basePath,\n assetPrefix: config.assetPrefix,\n },\n },\n ]\n : []),\n ...(isEdgeServer\n ? [\n {\n resolve: {\n fallback: {\n process: require.resolve('./polyfills/process'),\n },\n },\n },\n ]\n : isClient\n ? [\n {\n resolve: {\n fallback:\n config.experimental.fallbackNodePolyfills === false\n ? {\n assert: false,\n buffer: false,\n constants: false,\n crypto: false,\n domain: false,\n http: false,\n https: false,\n os: false,\n path: false,\n punycode: false,\n process: false,\n querystring: false,\n stream: false,\n string_decoder: false,\n sys: false,\n timers: false,\n tty: false,\n util: false,\n vm: false,\n zlib: false,\n events: false,\n setImmediate: false,\n }\n : {\n assert: require.resolve(\n 'next/dist/compiled/assert'\n ),\n buffer: require.resolve(\n 'next/dist/compiled/buffer'\n ),\n constants: require.resolve(\n 'next/dist/compiled/constants-browserify'\n ),\n crypto: require.resolve(\n 'next/dist/compiled/crypto-browserify'\n ),\n domain: require.resolve(\n 'next/dist/compiled/domain-browser'\n ),\n http: require.resolve(\n 'next/dist/compiled/stream-http'\n ),\n https: require.resolve(\n 'next/dist/compiled/https-browserify'\n ),\n os: require.resolve(\n 'next/dist/compiled/os-browserify'\n ),\n path: require.resolve(\n 'next/dist/compiled/path-browserify'\n ),\n punycode: require.resolve(\n 'next/dist/compiled/punycode'\n ),\n process: require.resolve('./polyfills/process'),\n // Handled in separate alias\n querystring: require.resolve(\n 'next/dist/compiled/querystring-es3'\n ),\n stream: require.resolve(\n 'next/dist/compiled/stream-browserify'\n ),\n string_decoder: require.resolve(\n 'next/dist/compiled/string_decoder'\n ),\n sys: require.resolve('next/dist/compiled/util'),\n timers: require.resolve(\n 'next/dist/compiled/timers-browserify'\n ),\n tty: require.resolve(\n 'next/dist/compiled/tty-browserify'\n ),\n // Handled in separate alias\n // url: require.resolve('url'),\n util: require.resolve('next/dist/compiled/util'),\n vm: require.resolve(\n 'next/dist/compiled/vm-browserify'\n ),\n zlib: require.resolve(\n 'next/dist/compiled/browserify-zlib'\n ),\n events: require.resolve(\n 'next/dist/compiled/events'\n ),\n setImmediate: require.resolve(\n 'next/dist/compiled/setimmediate'\n ),\n },\n },\n },\n ]\n : []),\n {\n // Mark `image-response.js` as side-effects free to make sure we can\n // tree-shake it if not used.\n test: /[\\\\/]next[\\\\/]dist[\\\\/](esm[\\\\/])?server[\\\\/]og[\\\\/]image-response\\.js/,\n sideEffects: false,\n },\n // Mark the action-client-wrapper module as side-effects free to make sure\n // the individual transformed module of client action can be tree-shaken.\n // This will make modules processed by `next-flight-server-reference-proxy-loader` become side-effects free,\n // then on client side the module ids will become tree-shakable.\n // e.g. the output of client action module will look like:\n // `export { a } from 'next-flight-server-reference-proxy-loader?id=idOfA&name=a!\n // `export { b } from 'next-flight-server-reference-proxy-loader?id=idOfB&name=b!\n {\n test: /[\\\\/]next[\\\\/]dist[\\\\/](esm[\\\\/])?build[\\\\/]webpack[\\\\/]loaders[\\\\/]next-flight-loader[\\\\/]action-client-wrapper\\.js/,\n sideEffects: false,\n },\n {\n // This loader rule should be before other rules, as it can output code\n // that still contains `\"use client\"` or `\"use server\"` statements that\n // needs to be re-transformed by the RSC compilers.\n // This loader rule works like a bridge between user's import and\n // the target module behind a package's barrel file. It reads SWC's\n // analysis result from the previous loader, and directly returns the\n // code that only exports values that are asked by the user.\n test: /__barrel_optimize__/,\n use: ({ resourceQuery }: { resourceQuery: string }) => {\n const names = (\n resourceQuery.match(/\\?names=([^&]+)/)?.[1] || ''\n ).split(',')\n\n return [\n {\n loader: 'next-barrel-loader',\n options: {\n names,\n swcCacheDir: path.join(\n dir,\n config?.distDir ?? '.next',\n 'cache',\n 'swc'\n ),\n },\n // This is part of the request value to serve as the module key.\n // The barrel loader are no-op re-exported modules keyed by\n // export names.\n ident: 'next-barrel-loader:' + resourceQuery,\n },\n ]\n },\n },\n {\n resolve: {\n alias: {\n next: NEXT_PROJECT_ROOT,\n },\n },\n },\n ],\n },\n plugins: [\n isNodeServer &&\n new bundler.NormalModuleReplacementPlugin(\n /\\.\\/(.+)\\.shared-runtime$/,\n function (resource) {\n const moduleName = path.basename(\n resource.request,\n '.shared-runtime'\n )\n const layer = resource.contextInfo.issuerLayer\n let runtime\n\n switch (layer) {\n case WEBPACK_LAYERS.serverSideRendering:\n case WEBPACK_LAYERS.reactServerComponents:\n case WEBPACK_LAYERS.appPagesBrowser:\n case WEBPACK_LAYERS.actionBrowser:\n runtime = 'app-page'\n break\n case null:\n case undefined:\n default:\n runtime = 'pages'\n }\n resource.request = `next/dist/server/route-modules/${runtime}/vendored/contexts/${moduleName}`\n }\n ),\n dev && new MemoryWithGcCachePlugin({ maxGenerations: 5 }),\n dev &&\n isClient &&\n (isRspack\n ? // eslint-disable-next-line\n new (getRspackReactRefresh() as any)({\n injectLoader: false,\n injectEntry: false,\n overlay: false,\n })\n : new ReactRefreshWebpackPlugin(webpack)),\n // Makes sure `Buffer` and `process` are polyfilled in client and flight bundles (same behavior as webpack 4)\n (isClient || isEdgeServer) &&\n new bundler.ProvidePlugin({\n // Buffer is used by getInlineScriptSource\n Buffer: [require.resolve('buffer'), 'Buffer'],\n // Avoid process being overridden when in web run time\n ...(isClient && { process: [require.resolve('process')] }),\n }),\n\n new (getWebpackBundler().DefinePlugin)(\n getDefineEnv({\n isTurbopack: false,\n config,\n dev,\n distDir,\n projectPath: dir,\n fetchCacheKeyPrefix,\n hasRewrites,\n isClient,\n isEdgeServer,\n isNodeServer,\n middlewareMatchers,\n omitNonDeterministic: isCompileMode,\n rewrites,\n })\n ),\n isClient &&\n new ReactLoadablePlugin({\n filename: REACT_LOADABLE_MANIFEST,\n pagesDir,\n appDir,\n runtimeAsset: `server/${MIDDLEWARE_REACT_LOADABLE_MANIFEST}.js`,\n dev,\n }),\n // rspack doesn't support the parser hooks used here\n !isRspack && (isClient || isEdgeServer) && new DropClientPage(),\n isNodeServer &&\n !dev &&\n new ((\n require('./webpack/plugins/next-trace-entrypoints-plugin') as typeof import('./webpack/plugins/next-trace-entrypoints-plugin')\n )\n .TraceEntryPointsPlugin as typeof import('./webpack/plugins/next-trace-entrypoints-plugin').TraceEntryPointsPlugin)(\n {\n rootDir: dir,\n appDir: appDir,\n pagesDir: pagesDir,\n esmExternals: config.experimental.esmExternals,\n outputFileTracingRoot: config.outputFileTracingRoot,\n appDirEnabled: hasAppDir,\n traceIgnores: [],\n compilerType,\n }\n ),\n // Moment.js is an extremely popular library that bundles large locale files\n // by default due to how Webpack interprets its code. This is a practical\n // solution that requires the user to opt into importing specific locales.\n // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n config.excludeDefaultMomentLocales &&\n new bundler.IgnorePlugin({\n resourceRegExp: /^\\.\\/locale$/,\n contextRegExp: /moment$/,\n }),\n ...(dev\n ? (() => {\n // Even though require.cache is server only we have to clear assets from both compilations\n // This is because the client compilation generates the build manifest that's used on the server side\n const { NextJsRequireCacheHotReloader } =\n require('./webpack/plugins/nextjs-require-cache-hot-reloader') as typeof import('./webpack/plugins/nextjs-require-cache-hot-reloader')\n const devPlugins: any[] = [\n new NextJsRequireCacheHotReloader({\n serverComponents: hasAppDir,\n }),\n ]\n\n if (isClient || isEdgeServer) {\n devPlugins.push(new bundler.HotModuleReplacementPlugin())\n }\n\n return devPlugins\n })()\n : []),\n !dev &&\n new bundler.IgnorePlugin({\n resourceRegExp: /react-is/,\n contextRegExp: /next[\\\\/]dist[\\\\/]/,\n }),\n isNodeOrEdgeCompilation &&\n new PagesManifestPlugin({\n dev,\n appDirEnabled: hasAppDir,\n isEdgeRuntime: isEdgeServer,\n distDir: !dev ? distDir : undefined,\n }),\n // MiddlewarePlugin should be after DefinePlugin so NEXT_PUBLIC_*\n // replacement is done before its process.env.* handling\n isEdgeServer &&\n new MiddlewarePlugin({\n dev,\n sriEnabled: !dev && !!config.experimental.sri?.algorithm,\n rewrites,\n edgeEnvironments: {\n __NEXT_BUILD_ID: buildId,\n NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: encryptionKey,\n __NEXT_PREVIEW_MODE_ID: previewProps.previewModeId,\n __NEXT_PREVIEW_MODE_SIGNING_KEY: previewProps.previewModeSigningKey,\n __NEXT_PREVIEW_MODE_ENCRYPTION_KEY:\n previewProps.previewModeEncryptionKey,\n },\n }),\n isClient &&\n new BuildManifestPlugin({\n buildId,\n rewrites,\n isDevFallback,\n appDirEnabled: hasAppDir,\n clientRouterFilters,\n }),\n isRspack\n ? new RspackProfilingPlugin({ runWebpackSpan })\n : new ProfilingPlugin({ runWebpackSpan, rootDir: dir }),\n new WellKnownErrorsPlugin(),\n isClient &&\n new CopyFilePlugin({\n // file path to build output of `@next/polyfill-nomodule`\n filePath: require.resolve('./polyfills/polyfill-nomodule'),\n cacheKey: process.env.__NEXT_VERSION as string,\n name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,\n minimize: false,\n info: {\n [CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL]: 1,\n // This file is already minified\n minimized: true,\n },\n }),\n hasAppDir && isClient && new AppBuildManifestPlugin({ dev }),\n hasAppDir &&\n (isClient\n ? new ClientReferenceManifestPlugin({\n dev,\n appDir,\n experimentalInlineCss: !!config.experimental.inlineCss,\n })\n : new FlightClientEntryPlugin({\n appDir,\n dev,\n isEdgeServer,\n encryptionKey,\n })),\n hasAppDir &&\n !isClient &&\n new NextTypesPlugin({\n dir,\n distDir: config.distDir,\n appDir,\n dev,\n isEdgeServer,\n pageExtensions: config.pageExtensions,\n typedRoutes: enableTypedRoutes,\n cacheLifeConfig: config.experimental.cacheLife,\n originalRewrites,\n originalRedirects,\n }),\n !dev &&\n isClient &&\n !!config.experimental.sri?.algorithm &&\n new SubresourceIntegrityPlugin(config.experimental.sri.algorithm),\n isClient &&\n new NextFontManifestPlugin({\n appDir,\n }),\n !dev &&\n isClient &&\n config.experimental.cssChunking &&\n (isRspack\n ? new (getRspackCore().experiments.CssChunkingPlugin)({\n strict: config.experimental.cssChunking === 'strict',\n nextjs: true,\n })\n : new CssChunkingPlugin(\n config.experimental.cssChunking === 'strict'\n )),\n telemetryPlugin,\n !dev &&\n isNodeServer &&\n new (\n require('./webpack/plugins/telemetry-plugin/telemetry-plugin') as typeof import('./webpack/plugins/telemetry-plugin/telemetry-plugin')\n ).TelemetryPlugin(new Map()),\n shouldEnableSlowModuleDetection &&\n new (\n require('./webpack/plugins/slow-module-detection-plugin') as typeof import('./webpack/plugins/slow-module-detection-plugin')\n ).default({\n compilerType,\n ...config.experimental.slowModuleDetection!,\n }),\n ].filter(Boolean as any as ExcludesFalse),\n }\n\n // Support tsconfig and jsconfig baseUrl\n // Only add the baseUrl if it's explicitly set in tsconfig/jsconfig\n if (resolvedBaseUrl && !resolvedBaseUrl.isImplicit) {\n webpackConfig.resolve?.modules?.push(resolvedBaseUrl.baseUrl)\n }\n\n // always add JsConfigPathsPlugin to allow hot-reloading\n // if the config is added/removed\n webpackConfig.resolve?.plugins?.unshift(\n new JsConfigPathsPlugin(\n jsConfig?.compilerOptions?.paths || {},\n resolvedBaseUrl\n )\n )\n\n const webpack5Config = webpackConfig as webpack.Configuration\n\n if (isEdgeServer) {\n webpack5Config.module?.rules?.unshift({\n test: /\\.wasm$/,\n loader: 'next-middleware-wasm-loader',\n type: 'javascript/auto',\n resourceQuery: /module/i,\n })\n webpack5Config.module?.rules?.unshift({\n dependency: 'url',\n loader: 'next-middleware-asset-loader',\n type: 'javascript/auto',\n layer: WEBPACK_LAYERS.edgeAsset,\n })\n webpack5Config.module?.rules?.unshift({\n issuerLayer: WEBPACK_LAYERS.edgeAsset,\n type: 'asset/source',\n })\n }\n\n webpack5Config.experiments = {\n layers: true,\n cacheUnaffected: true,\n buildHttp: Array.isArray(config.experimental.urlImports)\n ? {\n allowedUris: config.experimental.urlImports,\n cacheLocation: path.join(dir, 'next.lock/data'),\n lockfileLocation: path.join(dir, 'next.lock/lock.json'),\n }\n : config.experimental.urlImports\n ? {\n cacheLocation: path.join(dir, 'next.lock/data'),\n lockfileLocation: path.join(dir, 'next.lock/lock.json'),\n ...config.experimental.urlImports,\n }\n : undefined,\n }\n\n webpack5Config.module!.parser = {\n javascript: {\n url: 'relative',\n },\n }\n webpack5Config.module!.generator = {\n asset: {\n filename: 'static/media/[name].[hash:8][ext]',\n },\n }\n\n if (!webpack5Config.output) {\n webpack5Config.output = {}\n }\n if (isClient) {\n webpack5Config.output.trustedTypes = 'nextjs#bundler'\n }\n\n if (isClient || isEdgeServer) {\n webpack5Config.output.enabledLibraryTypes = ['assign']\n }\n\n // This enables managedPaths for all node_modules\n // and also for the unplugged folder when using yarn pnp\n // It also add the yarn cache to the immutable paths\n webpack5Config.snapshot = {}\n if (process.versions.pnp === '3') {\n webpack5Config.snapshot.managedPaths = [\n /^(.+?(?:[\\\\/]\\.yarn[\\\\/]unplugged[\\\\/][^\\\\/]+)?[\\\\/]node_modules[\\\\/])/,\n ]\n } else {\n webpack5Config.snapshot.managedPaths = [/^(.+?[\\\\/]node_modules[\\\\/])/]\n }\n if (process.versions.pnp === '3') {\n webpack5Config.snapshot.immutablePaths = [\n /^(.+?[\\\\/]cache[\\\\/][^\\\\/]+\\.zip[\\\\/]node_modules[\\\\/])/,\n ]\n }\n\n if (dev) {\n if (!webpack5Config.optimization) {\n webpack5Config.optimization = {}\n }\n\n // For Server Components, it's necessary to have provided exports collected\n // to generate the correct flight manifest.\n if (!hasAppDir) {\n webpack5Config.optimization.providedExports = false\n }\n webpack5Config.optimization.usedExports = false\n }\n\n const configVars = JSON.stringify({\n optimizePackageImports: config?.experimental?.optimizePackageImports,\n crossOrigin: config.crossOrigin,\n pageExtensions: pageExtensions,\n trailingSlash: config.trailingSlash,\n buildActivityPosition:\n config.devIndicators === false\n ? undefined\n : config.devIndicators.position,\n productionBrowserSourceMaps: !!config.productionBrowserSourceMaps,\n reactStrictMode: config.reactStrictMode,\n optimizeCss: config.experimental.optimizeCss,\n nextScriptWorkers: config.experimental.nextScriptWorkers,\n scrollRestoration: config.experimental.scrollRestoration,\n typedRoutes: config.experimental.typedRoutes,\n basePath: config.basePath,\n excludeDefaultMomentLocales: config.excludeDefaultMomentLocales,\n assetPrefix: config.assetPrefix,\n disableOptimizedLoading,\n isEdgeRuntime: isEdgeServer,\n reactProductionProfiling,\n webpack: !!config.webpack,\n hasRewrites,\n swcLoader: useSWCLoader,\n removeConsole: config.compiler?.removeConsole,\n reactRemoveProperties: config.compiler?.reactRemoveProperties,\n styledComponents: config.compiler?.styledComponents,\n relay: config.compiler?.relay,\n emotion: config.compiler?.emotion,\n modularizeImports: config.modularizeImports,\n imageLoaderFile: config.images.loaderFile,\n clientTraceMetadata: config.experimental.clientTraceMetadata,\n serverSourceMaps: config.experimental.serverSourceMaps,\n serverReferenceHashSalt: encryptionKey,\n })\n\n const cache: any = {\n type: 'filesystem',\n // Disable memory cache in development in favor of our own MemoryWithGcCachePlugin.\n maxMemoryGenerations: dev ? 0 : Infinity, // Infinity is default value for production in webpack currently.\n // Includes:\n // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)\n // - Next.js version\n // - next.config.js keys that affect compilation\n version: `${__dirname}|${process.env.__NEXT_VERSION}|${configVars}`,\n cacheDirectory: path.join(distDir, 'cache', 'webpack'),\n // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.\n // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.\n // For local development, we still want to compress the cache files individually to avoid I/O bottlenecks\n // as we are seeing 1~10 seconds of fs I/O time from user reports.\n compression: dev ? 'gzip' : false,\n }\n\n // Adds `next.config.js` as a buildDependency when custom webpack config is provided\n if (config.webpack && config.configFile) {\n cache.buildDependencies = {\n config: [config.configFile],\n // We don't want to use the webpack default buildDependencies as we already include the next.js version\n defaultWebpack: [],\n }\n } else {\n cache.buildDependencies = {\n // We don't want to use the webpack default buildDependencies as we already include the next.js version\n defaultWebpack: [],\n }\n }\n webpack5Config.plugins?.push((compiler) => {\n compiler.hooks.done.tap('next-build-dependencies', (stats) => {\n const buildDependencies = stats.compilation.buildDependencies\n const nextPackage = path.dirname(require.resolve('next/package.json'))\n // Remove all next.js build dependencies, they are already covered by the cacheVersion\n // and next.js also imports the output files which leads to broken caching.\n for (const dep of buildDependencies) {\n if (dep.startsWith(nextPackage)) {\n buildDependencies.delete(dep)\n }\n }\n })\n })\n\n webpack5Config.cache = cache\n\n if (process.env.NEXT_WEBPACK_LOGGING) {\n const infra = process.env.NEXT_WEBPACK_LOGGING.includes('infrastructure')\n const profileClient =\n process.env.NEXT_WEBPACK_LOGGING.includes('profile-client')\n const profileServer =\n process.env.NEXT_WEBPACK_LOGGING.includes('profile-server')\n const summaryClient =\n process.env.NEXT_WEBPACK_LOGGING.includes('summary-client')\n const summaryServer =\n process.env.NEXT_WEBPACK_LOGGING.includes('summary-server')\n\n const profile =\n (profileClient && isClient) || (profileServer && isNodeOrEdgeCompilation)\n const summary =\n (summaryClient && isClient) || (summaryServer && isNodeOrEdgeCompilation)\n\n const logDefault = !infra && !profile && !summary\n\n if (logDefault || infra) {\n webpack5Config.infrastructureLogging = {\n level: 'verbose',\n debug: /FileSystemInfo/,\n }\n }\n\n if (logDefault || profile) {\n webpack5Config.plugins!.push((compiler: webpack.Compiler) => {\n compiler.hooks.done.tap('next-webpack-logging', (stats) => {\n console.log(\n stats.toString({\n colors: true,\n logging: logDefault ? 'log' : 'verbose',\n })\n )\n })\n })\n } else if (summary) {\n webpack5Config.plugins!.push((compiler: webpack.Compiler) => {\n compiler.hooks.done.tap('next-webpack-logging', (stats) => {\n console.log(\n stats.toString({\n preset: 'summary',\n colors: true,\n timings: true,\n })\n )\n })\n })\n }\n\n if (profile) {\n const ProgressPlugin =\n webpack.ProgressPlugin as unknown as typeof webpack.ProgressPlugin\n webpack5Config.plugins!.push(\n new ProgressPlugin({\n profile: true,\n })\n )\n webpack5Config.profile = true\n }\n }\n\n webpackConfig = await buildConfiguration(webpackConfig, {\n supportedBrowsers,\n rootDirectory: dir,\n customAppFile: pagesDir\n ? new RegExp(escapeStringRegexp(path.join(pagesDir, `_app`)))\n : undefined,\n hasAppDir,\n isDevelopment: dev,\n isServer: isNodeOrEdgeCompilation,\n isEdgeRuntime: isEdgeServer,\n targetWeb: isClient || isEdgeServer,\n assetPrefix: config.assetPrefix || '',\n sassOptions: config.sassOptions,\n productionBrowserSourceMaps: config.productionBrowserSourceMaps,\n future: config.future,\n experimental: config.experimental,\n disableStaticImages: config.images.disableStaticImages,\n transpilePackages: config.transpilePackages,\n serverSourceMaps: config.experimental.serverSourceMaps,\n })\n\n // @ts-ignore Cache exists\n webpackConfig.cache.name = `${webpackConfig.name}-${webpackConfig.mode}${\n isDevFallback ? '-fallback' : ''\n }`\n\n if (dev) {\n if (webpackConfig.module) {\n webpackConfig.module.unsafeCache = (module: any) =>\n !UNSAFE_CACHE_REGEX.test(module.resource)\n } else {\n webpackConfig.module = {\n unsafeCache: (module: any) => !UNSAFE_CACHE_REGEX.test(module.resource),\n }\n }\n }\n\n let originalDevtool = webpackConfig.devtool\n if (typeof config.webpack === 'function') {\n const pluginCountBefore = webpackConfig.plugins?.length\n\n webpackConfig = config.webpack(webpackConfig, {\n dir,\n dev,\n isServer: isNodeOrEdgeCompilation,\n buildId,\n config,\n defaultLoaders,\n totalPages: Object.keys(entrypoints).length,\n webpack: bundler,\n ...(isNodeOrEdgeCompilation\n ? {\n nextRuntime: isEdgeServer ? 'edge' : 'nodejs',\n }\n : {}),\n })\n\n if (telemetryPlugin && pluginCountBefore) {\n const pluginCountAfter = webpackConfig.plugins?.length\n if (pluginCountAfter) {\n const pluginsChanged = pluginCountAfter !== pluginCountBefore\n telemetryPlugin.addUsage('webpackPlugins', pluginsChanged ? 1 : 0)\n }\n }\n\n if (!webpackConfig) {\n throw new Error(\n `Webpack config is undefined. You may have forgot to return properly from within the \"webpack\" method of your ${config.configFileName}.\\n` +\n 'See more info here https://nextjs.org/docs/messages/undefined-webpack-config'\n )\n }\n\n if (dev && originalDevtool !== webpackConfig.devtool) {\n webpackConfig.devtool = originalDevtool\n devtoolRevertWarning(originalDevtool)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const webpack5Config = webpackConfig as webpack.Configuration\n\n // disable lazy compilation of entries as next.js has it's own method here\n if (webpack5Config.experiments?.lazyCompilation === true) {\n webpack5Config.experiments.lazyCompilation = {\n entries: false,\n }\n } else if (\n typeof webpack5Config.experiments?.lazyCompilation === 'object' &&\n webpack5Config.experiments.lazyCompilation.entries !== false\n ) {\n webpack5Config.experiments.lazyCompilation.entries = false\n }\n\n if (typeof (webpackConfig as any).then === 'function') {\n console.warn(\n '> Promise returned in next config. https://nextjs.org/docs/messages/promise-in-next-config'\n )\n }\n }\n const rules = webpackConfig.module?.rules || []\n\n const customSvgRule = rules.find(\n (rule): rule is webpack.RuleSetRule =>\n (rule &&\n typeof rule === 'object' &&\n rule.loader !== 'next-image-loader' &&\n 'test' in rule &&\n rule.test instanceof RegExp &&\n rule.test.test('.svg')) ||\n false\n )\n\n if (customSvgRule && hasAppDir) {\n // Create React aliases for SVG components that were transformed using a\n // custom webpack config with e.g. the `@svgr/webpack` loader, or the\n // `babel-plugin-inline-react-svg` plugin.\n rules.push({\n test: customSvgRule.test,\n oneOf: [\n WEBPACK_LAYERS.reactServerComponents,\n WEBPACK_LAYERS.serverSideRendering,\n WEBPACK_LAYERS.appPagesBrowser,\n ].map((layer) => ({\n issuerLayer: layer,\n resolve: {\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n })),\n })\n }\n\n if (!config.images.disableStaticImages) {\n const nextImageRule = rules.find(\n (rule) =>\n rule && typeof rule === 'object' && rule.loader === 'next-image-loader'\n )\n if (customSvgRule && nextImageRule && typeof nextImageRule === 'object') {\n // Exclude svg if the user already defined it in custom\n // webpack config such as the `@svgr/webpack` loader, or\n // the `babel-plugin-inline-react-svg` plugin.\n nextImageRule.test = /\\.(png|jpg|jpeg|gif|webp|avif|ico|bmp)$/i\n }\n }\n\n if (\n config.experimental.craCompat &&\n webpackConfig.module?.rules &&\n webpackConfig.plugins\n ) {\n // CRA allows importing non-webpack handled files with file-loader\n // these need to be the last rule to prevent catching other items\n // https://github.com/facebook/create-react-app/blob/fddce8a9e21bf68f37054586deb0c8636a45f50b/packages/react-scripts/config/webpack.config.js#L594\n const fileLoaderExclude = [/\\.(js|mjs|jsx|ts|tsx|json)$/]\n const fileLoader = {\n exclude: fileLoaderExclude,\n issuer: fileLoaderExclude,\n type: 'asset/resource',\n }\n\n const topRules = []\n const innerRules = []\n\n for (const rule of webpackConfig.module.rules) {\n if (!rule || typeof rule !== 'object') continue\n if (rule.resolve) {\n topRules.push(rule)\n } else {\n if (\n rule.oneOf &&\n !(rule.test || rule.exclude || rule.resource || rule.issuer)\n ) {\n rule.oneOf.forEach((r) => innerRules.push(r))\n } else {\n innerRules.push(rule)\n }\n }\n }\n\n webpackConfig.module.rules = [\n ...(topRules as any),\n {\n oneOf: [...innerRules, fileLoader],\n },\n ]\n }\n\n // Backwards compat with webpack-dev-middleware options object\n if (typeof config.webpackDevMiddleware === 'function') {\n const options = config.webpackDevMiddleware({\n watchOptions: webpackConfig.watchOptions,\n })\n if (options.watchOptions) {\n webpackConfig.watchOptions = options.watchOptions\n }\n }\n\n function canMatchCss(rule: webpack.RuleSetCondition | undefined): boolean {\n if (!rule) {\n return false\n }\n\n const fileNames = [\n '/tmp/NEXTJS_CSS_DETECTION_FILE.css',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.scss',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.sass',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.less',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.styl',\n ]\n\n if (rule instanceof RegExp && fileNames.some((input) => rule.test(input))) {\n return true\n }\n\n if (typeof rule === 'function') {\n if (\n fileNames.some((input) => {\n try {\n if (rule(input)) {\n return true\n }\n } catch {}\n return false\n })\n ) {\n return true\n }\n }\n\n if (Array.isArray(rule) && rule.some(canMatchCss)) {\n return true\n }\n\n return false\n }\n\n const hasUserCssConfig =\n webpackConfig.module?.rules?.some(\n (rule: any) => canMatchCss(rule.test) || canMatchCss(rule.include)\n ) ?? false\n\n if (hasUserCssConfig) {\n // only show warning for one build\n if (isNodeOrEdgeCompilation) {\n console.warn(\n yellow(bold('Warning: ')) +\n bold(\n 'Built-in CSS support is being disabled due to custom CSS configuration being detected.\\n'\n ) +\n 'See here for more info: https://nextjs.org/docs/messages/built-in-css-disabled\\n'\n )\n }\n\n if (webpackConfig.module?.rules?.length) {\n // Remove default CSS Loaders\n webpackConfig.module.rules.forEach((r) => {\n if (!r || typeof r !== 'object') return\n if (Array.isArray(r.oneOf)) {\n r.oneOf = r.oneOf.filter(\n (o) => (o as any)[Symbol.for('__next_css_remove')] !== true\n )\n }\n })\n }\n if (webpackConfig.plugins?.length) {\n // Disable CSS Extraction Plugin\n webpackConfig.plugins = webpackConfig.plugins.filter(\n (p) => (p as any).__next_css_remove !== true\n )\n }\n if (webpackConfig.optimization?.minimizer?.length) {\n // Disable CSS Minifier\n webpackConfig.optimization.minimizer =\n webpackConfig.optimization.minimizer.filter(\n (e) => (e as any).__next_css_remove !== true\n )\n }\n }\n\n // Inject missing React Refresh loaders so that development mode is fast:\n if (dev && isClient) {\n attachReactRefresh(webpackConfig, defaultLoaders.babel)\n }\n\n // Backwards compat for `main.js` entry key\n // and setup of dependencies between entries\n // we can't do that in the initial entry for\n // backward-compat reasons\n const originalEntry: any = webpackConfig.entry\n if (typeof originalEntry !== 'undefined') {\n const updatedEntry = async () => {\n const entry: webpack.EntryObject =\n typeof originalEntry === 'function'\n ? await originalEntry()\n : originalEntry\n // Server compilation doesn't have main.js\n if (\n clientEntries &&\n Array.isArray(entry['main.js']) &&\n entry['main.js'].length > 0\n ) {\n const originalFile = clientEntries[\n CLIENT_STATIC_FILES_RUNTIME_MAIN\n ] as string\n entry[CLIENT_STATIC_FILES_RUNTIME_MAIN] = [\n ...entry['main.js'],\n originalFile,\n ]\n }\n delete entry['main.js']\n\n for (const name of Object.keys(entry)) {\n entry[name] = finalizeEntrypoint({\n value: entry[name],\n compilerType,\n name,\n hasAppDir,\n })\n }\n\n return entry\n }\n // @ts-ignore webpack 5 typings needed\n webpackConfig.entry = updatedEntry\n }\n\n if (!dev && typeof webpackConfig.entry === 'function') {\n // entry is always a function\n webpackConfig.entry = await webpackConfig.entry()\n }\n\n return webpackConfig\n}\n\nfunction getNextRootParamsRules({\n isRootParamsEnabled,\n isClient,\n appDir,\n pageExtensions,\n}: {\n isRootParamsEnabled: boolean\n isClient: boolean\n appDir: string | undefined\n pageExtensions: string[]\n}): webpack.RuleSetRule[] {\n // Match resolved import of 'next/root-params'\n const nextRootParamsModule = path.join(NEXT_PROJECT_ROOT, 'root-params.js')\n\n const createInvalidImportRule = (message: string) => {\n return {\n resource: nextRootParamsModule,\n loader: 'next-invalid-import-error-loader',\n options: {\n message,\n } satisfies InvalidImportLoaderOpts,\n } satisfies webpack.RuleSetRule\n }\n\n // Hard-error if the flag is not enabled, regardless of if we're on the server or on the client.\n if (!isRootParamsEnabled) {\n return [\n createInvalidImportRule(\n \"'next/root-params' can only be imported when `experimental.rootParams` is enabled.\"\n ),\n ]\n }\n\n // If there's no app-dir (and thus no layouts), there's no sensible way to use 'next/root-params',\n // because we wouldn't generate any getters.\n if (!appDir) {\n return [\n createInvalidImportRule(\n \"'next/root-params' can only be used with the App Directory.\"\n ),\n ]\n }\n\n // In general, the compiler should prevent importing 'next/root-params' from client modules, but it doesn't catch everything.\n // If an import slips through our validation, make it error.\n const invalidClientImportRule = createInvalidImportRule(\n \"'next/root-params' cannot be imported from a Client Component module. It should only be used from a Server Component.\"\n )\n\n // in the browser compilation we can skip the server rules, because we know all imports will be invalid.\n if (isClient) {\n return [invalidClientImportRule]\n }\n\n return [\n {\n oneOf: [\n {\n resource: nextRootParamsModule,\n issuerLayer: shouldUseReactServerCondition as (\n layer: string\n ) => boolean,\n loader: 'next-root-params-loader',\n options: {\n appDir,\n pageExtensions,\n } satisfies RootParamsLoaderOpts,\n },\n // if the rule above didn't match, we're in the SSR layer (or something else that isn't server-only).\n invalidClientImportRule,\n ],\n },\n ]\n}\n"],"names":["NODE_BASE_ESM_RESOLVE_OPTIONS","NODE_BASE_RESOLVE_OPTIONS","NODE_ESM_RESOLVE_OPTIONS","NODE_RESOLVE_OPTIONS","attachReactRefresh","babelIncludeRegexes","getBaseWebpackConfig","getCacheDirectories","hasExternalOtelApiPackage","loadProjectInfo","nextImageLoaderRegex","EXTERNAL_PACKAGES","require","DEFAULT_TRANSPILED_PACKAGES","parseInt","React","version","Error","browserNonTranspileModules","precompileRegex","asyncStoragesRegex","nodePathList","process","env","NODE_PATH","split","platform","filter","p","baseWatchOptions","Object","freeze","aggregateTimeout","ignored","isModuleCSS","module","type","devtoolRevertWarning","execOnce","devtool","console","warn","yellow","bold","loggedSwcDisabled","loggedIgnoredCompilerOptions","reactRefreshLoaderName","getReactRefreshLoader","NEXT_RSPACK","getRspackReactRefresh","loader","resolve","webpackConfig","targetLoader","reactRefreshLoader","rules","forEach","rule","curr","use","Array","isArray","some","r","idx","findIndex","splice","dependencyType","modules","fallback","exportsFields","importsFields","conditionNames","descriptionFiles","extensions","enforceExtensions","symlinks","mainFields","mainFiles","roots","fullySpecified","preferRelative","preferAbsolute","restrictions","alias","dir","config","dev","jsConfig","jsConfigPath","resolvedBaseUrl","loadJsConfig","supportedBrowsers","getSupportedBrowsers","UNSAFE_CACHE_REGEX","configs","Set","map","cfg","cache","cacheDirectory","buildId","encryptionKey","compilerType","entrypoints","isDevFallback","pagesDir","reactProductionProfiling","rewrites","originalRewrites","originalRedirects","runWebpackSpan","appDir","middlewareMatchers","noMangling","clientRouterFilters","fetchCacheKeyPrefix","isCompileMode","previewProps","webpack5Config","bundler","getWebpackBundler","isClient","COMPILER_NAMES","client","isEdgeServer","edgeServer","isNodeServer","server","isRspack","Boolean","FlightClientEntryPlugin","BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN","RspackFlightClientEntryPlugin","NextFlightClientEntryPlugin","isNodeOrEdgeCompilation","hasRewrites","beforeFiles","length","afterFiles","hasAppDir","disableOptimizedLoading","enableTypedRoutes","experimental","typedRoutes","bundledReactChannel","needsExperimentalReact","babelConfigFile","getBabelConfigFile","hasCustomExportOutput","distDir","path","join","useSWCLoader","forceSwcTransforms","SWCBinaryTarget","undefined","binaryTarget","getBinaryMetadata","target","Log","info","relative","loadBindings","useWasmBinary","finalTranspilePackages","transpilePackages","concat","pkg","optimizePackageImports","includes","push","compiler","excludeCache","exclude","excludePath","cached","shouldExclude","test","isResourceInPackages","shouldIncludeExternalDirs","externalDir","codeCondition","or","include","babelLoader","getBabelLoader","reactCompiler","reactCompilerLoader","getReactCompilerLoader","swcTraceProfilingInitialized","getSwcLoader","extraOptions","swcTraceProfiling","initCustomTraceSubscriber","Date","now","useBuiltinSwcLoader","BUILTIN_SWC_LOADER","options","isServer","rootDir","hasReactRefresh","swcCacheDir","serverReferenceHashSalt","pnp","versions","optimizeServerReact","modularizeImports","decorators","compilerOptions","experimentalDecorators","emitDecoratorMetadata","regeneratorRuntimePath","nextConfig","swcServerLayerLoader","serverComponents","bundleLayer","WEBPACK_LAYERS","reactServerComponents","esm","swcSSRLayerLoader","serverSideRendering","swcBrowserLayerLoader","appPagesBrowser","swcDefaultLoader","defaultLoaders","babel","appServerLayerLoaders","instrumentLayerLoaders","middlewareLayerLoaders","middleware","reactRefreshLoaders","createClientLayerLoader","isBrowserLayer","reactRefresh","appBrowserLayerLoaders","appSSRLayerLoaders","apiRoutesLayerLoaders","apiNode","pageExtensions","outputPath","SERVER_DIRECTORY","reactServerCondition","edgeConditionNames","reactRefreshEntry","entry","clientEntries","CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH","CLIENT_STATIC_FILES_RUNTIME_AMP","NEXT_PROJECT_ROOT_DIST_CLIENT","replace","CLIENT_STATIC_FILES_RUNTIME_MAIN","CLIENT_STATIC_FILES_RUNTIME_MAIN_APP","resolveConfig","extensionAlias","createWebpackAliases","getMainField","plugins","OptionalPeerDependencyResolverPlugin","tsConfig","configFile","nextFrameworkPaths","topLevelFrameworkPaths","visitedFrameworkPackages","addPackagePath","packageName","relativeToPath","paths","has","add","packageJsonPath","directory","dependencies","name","keys","_","crossOrigin","serverExternalPackages","externalPackageConflicts","optOutBundlingPackages","optOutBundlingPackageRegex","RegExp","transpilePackagesRegex","handleExternals","makeExternalHandler","transpiledPackages","pageExtensionsRegex","aliasCodeConditionTest","builtinModules","shouldEnableSlowModuleDetection","slowModuleDetection","getParallelism","override","Number","NEXT_WEBPACK_PARALLELISM","telemetryPlugin","TelemetryPlugin","Map","relay","styledComponents","reactRemoveProperties","removeConsole","jsxImportSource","emotion","skipMiddlewareUrlNormalize","skipTrailingSlashRedirect","esmExternals","parallelism","externalsPresets","node","externals","getEdgePolyfilledModules","handleWebpackExternalForEdgeRuntime","context","request","contextInfo","getResolve","issuerLayer","resolveFunction","resolveContext","requestToResolve","Promise","reject","err","result","resolveData","isEsm","descriptionFileData","optimization","emitOnErrors","checkWasmTypes","nodeEnv","splitChunks","extractRootNodeModule","modulePath","regex","match","cacheGroups","vendor","chunks","reuseExistingChunk","minSize","minChunks","maxAsyncRequests","maxInitialRequests","moduleId","nameForCondition","rootModule","hash","crypto","createHash","update","digest","default","defaultVendors","filename","frameworkCacheGroup","layer","isWebpackDefaultLayer","resource","pkgPath","startsWith","priority","enforce","libCacheGroup","size","updateHash","libIdent","substring","chunk","framework","RSPACK_DEFAULT_LAYERS_REGEX","lib","runtimeChunk","CLIENT_STATIC_FILES_RUNTIME_WEBPACK","minimize","serverMinification","minimizer","getRspackCore","SwcJsMinimizerRspackPlugin","minimizerOptions","compress","inline","global_defs","mangle","reserved","disableCharFreq","MinifyPlugin","apply","__NEXT_TEST_MODE","useLightningcss","LightningCssMinimizerRspackPlugin","targets","CssMinimizerPlugin","postcssOptions","annotation","watchOptions","poll","pollIntervalMs","output","publicPath","assetPrefix","endsWith","slice","library","libraryTarget","hotUpdateChunkFilename","hotUpdateMainFilename","chunkFilename","strictModuleExceptionHandling","crossOriginLoading","devtoolModuleFilenameTemplate","webassemblyModuleFilename","hashFunction","hashDigestLength","performance","resolveLoader","reduce","__dirname","GROUP","serverOnly","neutralTarget","createServerOnlyClientOnlyAliases","not","message","shared","resourceQuery","WEBPACK_RESOURCE_QUERIES","metadataRoute","isWebpackBundledLayer","createNextApiEsmAliases","shouldUseReactServerCondition","createAppRouterApiAliases","isWebpackClientOnlyLayer","and","metadata","metadataImageMeta","createVendoredReactAliases","isBrowser","getNextRootParamsRules","isRootParamsEnabled","rootParams","cacheComponents","edgeSSREntry","oneOf","parser","url","apiEdge","instrument","images","disableStaticImages","issuer","regexLikeCss","dependency","isDev","basePath","fallbackNodePolyfills","assert","buffer","constants","domain","http","https","os","punycode","querystring","stream","string_decoder","sys","timers","tty","util","vm","zlib","events","setImmediate","sideEffects","names","ident","next","NEXT_PROJECT_ROOT","NormalModuleReplacementPlugin","moduleName","basename","runtime","actionBrowser","MemoryWithGcCachePlugin","maxGenerations","injectLoader","injectEntry","overlay","ReactRefreshWebpackPlugin","webpack","ProvidePlugin","Buffer","DefinePlugin","getDefineEnv","isTurbopack","projectPath","omitNonDeterministic","ReactLoadablePlugin","REACT_LOADABLE_MANIFEST","runtimeAsset","MIDDLEWARE_REACT_LOADABLE_MANIFEST","DropClientPage","TraceEntryPointsPlugin","outputFileTracingRoot","appDirEnabled","traceIgnores","excludeDefaultMomentLocales","IgnorePlugin","resourceRegExp","contextRegExp","NextJsRequireCacheHotReloader","devPlugins","HotModuleReplacementPlugin","PagesManifestPlugin","isEdgeRuntime","MiddlewarePlugin","sriEnabled","sri","algorithm","edgeEnvironments","__NEXT_BUILD_ID","NEXT_SERVER_ACTIONS_ENCRYPTION_KEY","__NEXT_PREVIEW_MODE_ID","previewModeId","__NEXT_PREVIEW_MODE_SIGNING_KEY","previewModeSigningKey","__NEXT_PREVIEW_MODE_ENCRYPTION_KEY","previewModeEncryptionKey","BuildManifestPlugin","RspackProfilingPlugin","ProfilingPlugin","WellKnownErrorsPlugin","CopyFilePlugin","filePath","cacheKey","__NEXT_VERSION","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL","minimized","AppBuildManifestPlugin","ClientReferenceManifestPlugin","experimentalInlineCss","inlineCss","NextTypesPlugin","cacheLifeConfig","cacheLife","SubresourceIntegrityPlugin","NextFontManifestPlugin","cssChunking","experiments","CssChunkingPlugin","strict","nextjs","isImplicit","baseUrl","unshift","JsConfigPathsPlugin","edgeAsset","layers","cacheUnaffected","buildHttp","urlImports","allowedUris","cacheLocation","lockfileLocation","javascript","generator","asset","trustedTypes","enabledLibraryTypes","snapshot","managedPaths","immutablePaths","providedExports","usedExports","configVars","JSON","stringify","trailingSlash","buildActivityPosition","devIndicators","position","productionBrowserSourceMaps","reactStrictMode","optimizeCss","nextScriptWorkers","scrollRestoration","swcLoader","imageLoaderFile","loaderFile","clientTraceMetadata","serverSourceMaps","maxMemoryGenerations","Infinity","compression","buildDependencies","defaultWebpack","hooks","done","tap","stats","compilation","nextPackage","dirname","dep","delete","NEXT_WEBPACK_LOGGING","infra","profileClient","profileServer","summaryClient","summaryServer","profile","summary","logDefault","infrastructureLogging","level","debug","log","toString","colors","logging","preset","timings","ProgressPlugin","buildConfiguration","rootDirectory","customAppFile","escapeStringRegexp","isDevelopment","targetWeb","sassOptions","future","mode","unsafeCache","originalDevtool","pluginCountBefore","totalPages","nextRuntime","pluginCountAfter","pluginsChanged","addUsage","configFileName","lazyCompilation","entries","then","customSvgRule","find","nextImageRule","craCompat","fileLoaderExclude","fileLoader","topRules","innerRules","webpackDevMiddleware","canMatchCss","fileNames","input","hasUserCssConfig","o","Symbol","for","__next_css_remove","e","originalEntry","updatedEntry","originalFile","finalizeEntrypoint","value","nextRootParamsModule","createInvalidImportRule","invalidClientImportRule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAuPaA,6BAA6B;eAA7BA;;IAbAC,yBAAyB;eAAzBA;;IAKAC,wBAAwB;eAAxBA;;IAzBAC,oBAAoB;eAApBA;;IA9BGC,kBAAkB;eAAlBA;;IAlEHC,mBAAmB;eAAnBA;;IA8Lb,OA65EC;eA75E6BC;;IAfdC,mBAAmB;eAAnBA;;IAXAC,yBAAyB;eAAzBA;;IA3BMC,eAAe;eAAfA;;IAHTC,oBAAoB;eAApBA;;;8DA5PK;kFACoB;4BACT;+DACV;yBACK;6DACP;2BAEY;8BACM;2BACsB;uBAQlD;4BAaA;wBAEkB;yBAEU;6DACd;wBACc;0EAI5B;4EACyB;qCACI;0CACL;4EACC;iCACA;qCACI;uCACE;qBACT;gCACE;sCACe;yCACyB;+CACzB;iCACd;qEAUzB;qBACsB;wCACU;4CACI;wCACJ;yCAEC;oCACL;wCACI;iCAEmB;yBAInD;qDAC8C;uCAO9C;wBAC+B;mCACJ;sCAI3B;8BAIA;2BAC8C;uCACf;0EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAU9B,MAAMC,oBACJC,QAAQ;AAEV,MAAMC,8BACJD,QAAQ;AAEV,IAAIE,SAASC,cAAK,CAACC,OAAO,IAAI,IAAI;IAChC,MAAM,qBAA8D,CAA9D,IAAIC,MAAM,sDAAV,qBAAA;eAAA;oBAAA;sBAAA;IAA6D;AACrE;AAEO,MAAMZ,sBAAgC;IAC3C;IACA;IACA;IACA;CACD;AAED,MAAMa,6BAA6B;IACjC,+FAA+F;IAC/F,2HAA2H;IAC3H,2DAA2D;IAC3D;IACA,oGAAoG;IACpG,8GAA8G;IAC9G;CACD;AACD,MAAMC,kBAAkB;AAExB,MAAMC,qBACJ;AAEF,wBAAwB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AAY;QACrD,6BAA6B;QAC7BlM,cAAckM,KAAK,GAAG,MAAMlM,cAAckM,KAAK;IACjD;IAEA,OAAOlM;AACT;AAEA,SAASoY,uBAAuB,EAC9BC,mBAAmB,EACnB/T,QAAQ,EACRV,MAAM,EACNgI,cAAc,EAMf;IACC,8CAA8C;IAC9C,MAAMgb,uBAAuBzgB,aAAI,CAACC,IAAI,CAACyU,+BAAiB,EAAE;IAE1D,MAAMgM,0BAA0B,CAACxP;QAC/B,OAAO;YACLjE,UAAUwT;YACV9mB,QAAQ;YACRqJ,SAAS;gBACPkO;YACF;QACF;IACF;IAEA,gGAAgG;IAChG,IAAI,CAACgB,qBAAqB;QACxB,OAAO;YACLwO,wBACE;SAEH;IACH;IAEA,kGAAkG;IAClG,4CAA4C;IAC5C,IAAI,CAACjjB,QAAQ;QACX,OAAO;YACLijB,wBACE;SAEH;IACH;IAEA,6HAA6H;IAC7H,4DAA4D;IAC5D,MAAMC,0BAA0BD,wBAC9B;IAGF,wGAAwG;IACxG,IAAIviB,UAAU;QACZ,OAAO;YAACwiB;SAAwB;IAClC;IAEA,OAAO;QACL;YACErO,OAAO;gBACL;oBACErF,UAAUwT;oBACVlW,aAAakH,oCAA6B;oBAG1C9X,QAAQ;oBACRqJ,SAAS;wBACPvF;wBACAgI;oBACF;gBACF;gBACA,qGAAqG;gBACrGkb;aACD;QACH;KACD;AACH","ignoreList":[0]}
1
+ {"version":3,"sources":["../../src/build/webpack-config.ts"],"sourcesContent":["import React from 'react'\nimport ReactRefreshWebpackPlugin from 'next/dist/compiled/@next/react-refresh-utils/dist/ReactRefreshWebpackPlugin'\nimport { yellow, bold } from '../lib/picocolors'\nimport crypto from 'crypto'\nimport { webpack } from 'next/dist/compiled/webpack/webpack'\nimport path from 'path'\n\nimport { getDefineEnv } from './define-env'\nimport { escapeStringRegexp } from '../shared/lib/escape-regexp'\nimport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES } from '../lib/constants'\nimport type { WebpackLayerName } from '../lib/constants'\nimport {\n isWebpackBundledLayer,\n isWebpackClientOnlyLayer,\n shouldUseReactServerCondition,\n isWebpackDefaultLayer,\n RSPACK_DEFAULT_LAYERS_REGEX,\n} from './utils'\nimport type { CustomRoutes } from '../lib/load-custom-routes.js'\nimport {\n CLIENT_STATIC_FILES_RUNTIME_AMP,\n CLIENT_STATIC_FILES_RUNTIME_MAIN,\n CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,\n CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL,\n CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,\n CLIENT_STATIC_FILES_RUNTIME_WEBPACK,\n MIDDLEWARE_REACT_LOADABLE_MANIFEST,\n REACT_LOADABLE_MANIFEST,\n SERVER_DIRECTORY,\n COMPILER_NAMES,\n} from '../shared/lib/constants'\nimport type { CompilerNameValues } from '../shared/lib/constants'\nimport { execOnce } from '../shared/lib/utils'\nimport type { NextConfigComplete } from '../server/config-shared'\nimport { finalizeEntrypoint } from './entries'\nimport * as Log from './output/log'\nimport { buildConfiguration } from './webpack/config'\nimport MiddlewarePlugin, {\n getEdgePolyfilledModules,\n handleWebpackExternalForEdgeRuntime,\n} from './webpack/plugins/middleware-plugin'\nimport BuildManifestPlugin from './webpack/plugins/build-manifest-plugin'\nimport { JsConfigPathsPlugin } from './webpack/plugins/jsconfig-paths-plugin'\nimport { DropClientPage } from './webpack/plugins/next-drop-client-page-plugin'\nimport PagesManifestPlugin from './webpack/plugins/pages-manifest-plugin'\nimport { ProfilingPlugin } from './webpack/plugins/profiling-plugin'\nimport { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin'\nimport { WellKnownErrorsPlugin } from './webpack/plugins/wellknown-errors-plugin'\nimport { regexLikeCss } from './webpack/config/blocks/css'\nimport { CopyFilePlugin } from './webpack/plugins/copy-file-plugin'\nimport { ClientReferenceManifestPlugin } from './webpack/plugins/flight-manifest-plugin'\nimport { FlightClientEntryPlugin as NextFlightClientEntryPlugin } from './webpack/plugins/flight-client-entry-plugin'\nimport { RspackFlightClientEntryPlugin } from './webpack/plugins/rspack-flight-client-entry-plugin'\nimport { NextTypesPlugin } from './webpack/plugins/next-types-plugin'\nimport type {\n Feature,\n SWC_TARGET_TRIPLE,\n} from './webpack/plugins/telemetry-plugin/telemetry-plugin'\nimport type { Span } from '../trace'\nimport type { MiddlewareMatcher } from './analysis/get-page-static-info'\nimport loadJsConfig, {\n type JsConfig,\n type ResolvedBaseUrl,\n} from './load-jsconfig'\nimport { loadBindings } from './swc'\nimport { AppBuildManifestPlugin } from './webpack/plugins/app-build-manifest-plugin'\nimport { SubresourceIntegrityPlugin } from './webpack/plugins/subresource-integrity-plugin'\nimport { NextFontManifestPlugin } from './webpack/plugins/next-font-manifest-plugin'\nimport { getSupportedBrowsers } from './utils'\nimport { MemoryWithGcCachePlugin } from './webpack/plugins/memory-with-gc-cache-plugin'\nimport { getBabelConfigFile } from './get-babel-config-file'\nimport { needsExperimentalReact } from '../lib/needs-experimental-react'\nimport type { SWCLoaderOptions } from './webpack/loaders/next-swc-loader'\nimport { isResourceInPackages, makeExternalHandler } from './handle-externals'\nimport {\n getMainField,\n edgeConditionNames,\n} from './webpack-config-rules/resolve'\nimport { OptionalPeerDependencyResolverPlugin } from './webpack/plugins/optional-peer-dependency-resolve-plugin'\nimport {\n createWebpackAliases,\n createServerOnlyClientOnlyAliases,\n createVendoredReactAliases,\n createNextApiEsmAliases,\n createAppRouterApiAliases,\n} from './create-compiler-aliases'\nimport { hasCustomExportOutput } from '../export/utils'\nimport { CssChunkingPlugin } from './webpack/plugins/css-chunking-plugin'\nimport {\n getBabelLoader,\n getReactCompilerLoader,\n} from './get-babel-loader-config'\nimport {\n NEXT_PROJECT_ROOT,\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n} from './next-dir-paths'\nimport { getRspackCore, getRspackReactRefresh } from '../shared/lib/get-rspack'\nimport { RspackProfilingPlugin } from './webpack/plugins/rspack-profiling-plugin'\nimport getWebpackBundler from '../shared/lib/get-webpack-bundler'\nimport type { NextBuildContext } from './build-context'\nimport type { RootParamsLoaderOpts } from './webpack/loaders/next-root-params-loader'\nimport type { InvalidImportLoaderOpts } from './webpack/loaders/next-invalid-import-error-loader'\n\ntype ExcludesFalse = <T>(x: T | false) => x is T\ntype ClientEntries = {\n [key: string]: string | string[]\n}\n\nconst EXTERNAL_PACKAGES =\n require('../lib/server-external-packages.json') as string[]\n\nconst DEFAULT_TRANSPILED_PACKAGES =\n require('../lib/default-transpiled-packages.json') as string[]\n\nif (parseInt(React.version) < 18) {\n throw new Error('Next.js requires react >= 18.2.0 to be installed.')\n}\n\nexport const babelIncludeRegexes: RegExp[] = [\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?shared[\\\\/]lib/,\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?client/,\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?pages/,\n /[\\\\/](strip-ansi|ansi-regex|styled-jsx)[\\\\/]/,\n]\n\nconst browserNonTranspileModules = [\n // Transpiling `process/browser` will trigger babel compilation error due to value replacement.\n // TypeError: Property left of AssignmentExpression expected node to be of a type [\"LVal\"] but instead got \"BooleanLiteral\"\n // e.g. `process.browser = true` will become `true = true`.\n /[\\\\/]node_modules[\\\\/]process[\\\\/]browser/,\n // Exclude precompiled react packages from browser compilation due to SWC helper insertion (#61791),\n // We fixed the issue but it's safer to exclude them from compilation since they don't need to be re-compiled.\n /[\\\\/]next[\\\\/]dist[\\\\/]compiled[\\\\/](react|react-dom|react-server-dom-webpack)(-experimental)?($|[\\\\/])/,\n]\nconst precompileRegex = /[\\\\/]next[\\\\/]dist[\\\\/]compiled[\\\\/]/\n\nconst asyncStoragesRegex =\n /next[\\\\/]dist[\\\\/](esm[\\\\/])?server[\\\\/]app-render[\\\\/](work-async-storage|action-async-storage|dynamic-access-async-storage|work-unit-async-storage)/\n\n// Support for NODE_PATH\nconst nodePathList = (process.env.NODE_PATH || '')\n .split(process.platform === 'win32' ? ';' : ':')\n .filter((p) => !!p)\n\nconst baseWatchOptions: webpack.Configuration['watchOptions'] = Object.freeze({\n aggregateTimeout: 5,\n ignored:\n // Matches **/node_modules/**, **/.git/** and **/.next/**\n /^((?:[^/]*(?:\\/|$))*)(\\.(git|next)|node_modules)(\\/((?:[^/]*(?:\\/|$))*)(?:$|\\/))?/,\n})\n\nfunction isModuleCSS(module: { type: string }) {\n return (\n // mini-css-extract-plugin\n module.type === `css/mini-extract` ||\n // extract-css-chunks-webpack-plugin (old)\n module.type === `css/extract-chunks` ||\n // extract-css-chunks-webpack-plugin (new)\n module.type === `css/extract-css-chunks`\n )\n}\n\nconst devtoolRevertWarning = execOnce(\n (devtool: webpack.Configuration['devtool']) => {\n console.warn(\n yellow(bold('Warning: ')) +\n bold(`Reverting webpack devtool to '${devtool}'.\\n`) +\n 'Changing the webpack devtool in development mode will cause severe performance regressions.\\n' +\n 'Read more: https://nextjs.org/docs/messages/improper-devtool'\n )\n }\n)\n\nlet loggedSwcDisabled = false\nlet loggedIgnoredCompilerOptions = false\nconst reactRefreshLoaderName =\n 'next/dist/compiled/@next/react-refresh-utils/dist/loader'\n\nfunction getReactRefreshLoader() {\n return process.env.NEXT_RSPACK\n ? getRspackReactRefresh().loader\n : require.resolve(reactRefreshLoaderName)\n}\n\nexport function attachReactRefresh(\n webpackConfig: webpack.Configuration,\n targetLoader: webpack.RuleSetUseItem\n) {\n const reactRefreshLoader = getReactRefreshLoader()\n webpackConfig.module?.rules?.forEach((rule) => {\n if (rule && typeof rule === 'object' && 'use' in rule) {\n const curr = rule.use\n // When the user has configured `defaultLoaders.babel` for a input file:\n if (curr === targetLoader) {\n rule.use = [reactRefreshLoader, curr as webpack.RuleSetUseItem]\n } else if (\n Array.isArray(curr) &&\n curr.some((r) => r === targetLoader) &&\n // Check if loader already exists:\n !curr.some(\n (r) => r === reactRefreshLoader || r === reactRefreshLoaderName\n )\n ) {\n const idx = curr.findIndex((r) => r === targetLoader)\n // Clone to not mutate user input\n rule.use = [...curr]\n\n // inject / input: [other, babel] output: [other, refresh, babel]:\n rule.use.splice(idx, 0, reactRefreshLoader)\n }\n }\n })\n}\n\nexport const NODE_RESOLVE_OPTIONS = {\n dependencyType: 'commonjs',\n modules: ['node_modules'],\n fallback: false,\n exportsFields: ['exports'],\n importsFields: ['imports'],\n conditionNames: ['node', 'require'],\n descriptionFiles: ['package.json'],\n extensions: ['.js', '.json', '.node'],\n enforceExtensions: false,\n symlinks: true,\n mainFields: ['main'],\n mainFiles: ['index'],\n roots: [],\n fullySpecified: false,\n preferRelative: false,\n preferAbsolute: false,\n restrictions: [],\n}\n\nexport const NODE_BASE_RESOLVE_OPTIONS = {\n ...NODE_RESOLVE_OPTIONS,\n alias: false,\n}\n\nexport const NODE_ESM_RESOLVE_OPTIONS = {\n ...NODE_RESOLVE_OPTIONS,\n alias: false,\n dependencyType: 'esm',\n conditionNames: ['node', 'import'],\n fullySpecified: true,\n}\n\nexport const NODE_BASE_ESM_RESOLVE_OPTIONS = {\n ...NODE_ESM_RESOLVE_OPTIONS,\n alias: false,\n}\n\nexport const nextImageLoaderRegex =\n /\\.(png|jpg|jpeg|gif|webp|avif|ico|bmp|svg)$/i\n\nexport async function loadProjectInfo({\n dir,\n config,\n dev,\n}: {\n dir: string\n config: NextConfigComplete\n dev: boolean\n}): Promise<{\n jsConfig: JsConfig\n jsConfigPath?: string\n resolvedBaseUrl: ResolvedBaseUrl\n supportedBrowsers: string[] | undefined\n}> {\n const { jsConfig, jsConfigPath, resolvedBaseUrl } = await loadJsConfig(\n dir,\n config\n )\n const supportedBrowsers = getSupportedBrowsers(dir, dev)\n return {\n jsConfig,\n jsConfigPath,\n resolvedBaseUrl,\n supportedBrowsers,\n }\n}\n\nexport function hasExternalOtelApiPackage(): boolean {\n try {\n require('@opentelemetry/api') as typeof import('@opentelemetry/api')\n return true\n } catch {\n return false\n }\n}\n\nconst UNSAFE_CACHE_REGEX = /[\\\\/]pages[\\\\/][^\\\\/]+(?:$|\\?|#)/\n\nexport function getCacheDirectories(\n configs: webpack.Configuration[]\n): Set<string> {\n return new Set(\n configs\n .map((cfg) => {\n if (typeof cfg.cache === 'object' && cfg.cache.type === 'filesystem') {\n return cfg.cache.cacheDirectory\n }\n return null\n })\n .filter((dir) => dir != null)\n )\n}\n\nexport default async function getBaseWebpackConfig(\n dir: string,\n {\n buildId,\n encryptionKey,\n config,\n compilerType,\n dev = false,\n entrypoints,\n isDevFallback = false,\n pagesDir,\n reactProductionProfiling = false,\n rewrites,\n originalRewrites,\n originalRedirects,\n runWebpackSpan,\n appDir,\n middlewareMatchers,\n noMangling,\n jsConfig,\n jsConfigPath,\n resolvedBaseUrl,\n supportedBrowsers,\n clientRouterFilters,\n fetchCacheKeyPrefix,\n isCompileMode,\n previewProps,\n }: {\n previewProps: NonNullable<(typeof NextBuildContext)['previewProps']>\n isCompileMode?: boolean\n buildId: string\n encryptionKey: string\n config: NextConfigComplete\n compilerType: CompilerNameValues\n dev?: boolean\n entrypoints: webpack.EntryObject\n isDevFallback?: boolean\n pagesDir: string | undefined\n reactProductionProfiling?: boolean\n rewrites: CustomRoutes['rewrites']\n originalRewrites: CustomRoutes['rewrites'] | undefined\n originalRedirects: CustomRoutes['redirects'] | undefined\n runWebpackSpan: Span\n appDir: string | undefined\n middlewareMatchers?: MiddlewareMatcher[]\n noMangling?: boolean\n jsConfig: any\n jsConfigPath?: string\n resolvedBaseUrl: ResolvedBaseUrl\n supportedBrowsers: string[] | undefined\n clientRouterFilters?: {\n staticFilter: ReturnType<\n import('../shared/lib/bloom-filter').BloomFilter['export']\n >\n dynamicFilter: ReturnType<\n import('../shared/lib/bloom-filter').BloomFilter['export']\n >\n }\n fetchCacheKeyPrefix?: string\n }\n): Promise<webpack.Configuration> {\n const bundler = getWebpackBundler()\n const isClient = compilerType === COMPILER_NAMES.client\n const isEdgeServer = compilerType === COMPILER_NAMES.edgeServer\n const isNodeServer = compilerType === COMPILER_NAMES.server\n\n const isRspack = Boolean(process.env.NEXT_RSPACK)\n\n const FlightClientEntryPlugin =\n isRspack && process.env.BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN\n ? RspackFlightClientEntryPlugin\n : NextFlightClientEntryPlugin\n\n // If the current compilation is aimed at server-side code instead of client-side code.\n const isNodeOrEdgeCompilation = isNodeServer || isEdgeServer\n\n const hasRewrites =\n rewrites.beforeFiles.length > 0 ||\n rewrites.afterFiles.length > 0 ||\n rewrites.fallback.length > 0\n\n const hasAppDir = !!appDir\n const disableOptimizedLoading = true\n const enableTypedRoutes = !!config.experimental.typedRoutes && hasAppDir\n const bundledReactChannel = needsExperimentalReact(config)\n ? '-experimental'\n : ''\n\n const babelConfigFile = getBabelConfigFile(dir)\n\n if (!dev && hasCustomExportOutput(config)) {\n config.distDir = '.next'\n }\n const distDir = path.join(dir, config.distDir)\n\n let useSWCLoader = !babelConfigFile || config.experimental.forceSwcTransforms\n let SWCBinaryTarget: [Feature, boolean] | undefined = undefined\n if (useSWCLoader) {\n // TODO: we do not collect wasm target yet\n const binaryTarget = (\n require('./swc') as typeof import('./swc')\n )?.getBinaryMetadata?.()?.target as SWC_TARGET_TRIPLE\n SWCBinaryTarget = binaryTarget\n ? [`swc/target/${binaryTarget}` as const, true]\n : undefined\n }\n\n if (!loggedSwcDisabled && !useSWCLoader && babelConfigFile) {\n Log.info(\n `Disabled SWC as replacement for Babel because of custom Babel configuration \"${path.relative(\n dir,\n babelConfigFile\n )}\" https://nextjs.org/docs/messages/swc-disabled`\n )\n loggedSwcDisabled = true\n }\n\n // eagerly load swc bindings instead of waiting for transform calls\n if (!babelConfigFile && isClient) {\n await loadBindings(config.experimental.useWasmBinary)\n }\n\n // since `pages` doesn't always bundle by default we need to\n // auto-include optimizePackageImports in transpilePackages\n const finalTranspilePackages: string[] = (\n config.transpilePackages || []\n ).concat(DEFAULT_TRANSPILED_PACKAGES)\n\n for (const pkg of config.experimental.optimizePackageImports || []) {\n if (!finalTranspilePackages.includes(pkg)) {\n finalTranspilePackages.push(pkg)\n }\n }\n\n if (!loggedIgnoredCompilerOptions && !useSWCLoader && config.compiler) {\n Log.info(\n '`compiler` options in `next.config.js` will be ignored while using Babel https://nextjs.org/docs/messages/ignored-compiler-options'\n )\n loggedIgnoredCompilerOptions = true\n }\n\n const excludeCache: Record<string, boolean> = {}\n function exclude(excludePath: string): boolean {\n const cached = excludeCache[excludePath]\n if (cached !== undefined) {\n return cached\n }\n\n const shouldExclude =\n excludePath.includes('node_modules') &&\n !babelIncludeRegexes.some((r) => r.test(excludePath)) &&\n !isResourceInPackages(excludePath, finalTranspilePackages)\n\n excludeCache[excludePath] = shouldExclude\n return shouldExclude\n }\n\n const shouldIncludeExternalDirs =\n config.experimental.externalDir || !!config.transpilePackages\n const codeCondition = {\n test: { or: [/\\.(tsx|ts|js|cjs|mjs|jsx)$/, /__barrel_optimize__/] },\n ...(shouldIncludeExternalDirs\n ? // Allowing importing TS/TSX files from outside of the root dir.\n {}\n : { include: [dir, ...babelIncludeRegexes] }),\n exclude,\n }\n\n const babelLoader = getBabelLoader(\n useSWCLoader,\n babelConfigFile,\n isNodeOrEdgeCompilation,\n distDir,\n pagesDir,\n dir,\n (appDir || pagesDir)!,\n dev,\n isClient,\n config.experimental?.reactCompiler,\n codeCondition.exclude\n )\n\n const reactCompilerLoader = babelLoader\n ? undefined\n : getReactCompilerLoader(\n config.experimental?.reactCompiler,\n dir,\n dev,\n isNodeOrEdgeCompilation,\n codeCondition.exclude\n )\n\n let swcTraceProfilingInitialized = false\n const getSwcLoader = (extraOptions: Partial<SWCLoaderOptions>) => {\n if (\n config?.experimental?.swcTraceProfiling &&\n !swcTraceProfilingInitialized\n ) {\n // This will init subscribers once only in a single process lifecycle,\n // even though it can be called multiple times.\n // Subscriber need to be initialized _before_ any actual swc's call (transform, etcs)\n // to collect correct trace spans when they are called.\n swcTraceProfilingInitialized = true\n ;(\n require('./swc') as typeof import('./swc')\n )?.initCustomTraceSubscriber?.(\n path.join(distDir, `swc-trace-profile-${Date.now()}.json`)\n )\n }\n\n const useBuiltinSwcLoader = process.env.BUILTIN_SWC_LOADER\n if (isRspack && useBuiltinSwcLoader) {\n return {\n loader: 'builtin:next-swc-loader',\n options: {\n isServer: isNodeOrEdgeCompilation,\n rootDir: dir,\n pagesDir,\n appDir,\n hasReactRefresh: dev && isClient,\n transpilePackages: finalTranspilePackages,\n supportedBrowsers,\n swcCacheDir: path.join(\n dir,\n config?.distDir ?? '.next',\n 'cache',\n 'swc'\n ),\n serverReferenceHashSalt: encryptionKey,\n\n // rspack specific options\n pnp: Boolean(process.versions.pnp),\n optimizeServerReact: Boolean(config.experimental.optimizeServerReact),\n modularizeImports: config.modularizeImports,\n decorators: Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n ),\n emitDecoratorMetadata: Boolean(\n jsConfig?.compilerOptions?.emitDecoratorMetadata\n ),\n regeneratorRuntimePath: require.resolve(\n 'next/dist/compiled/regenerator-runtime'\n ),\n\n ...extraOptions,\n },\n }\n }\n\n return {\n loader: 'next-swc-loader',\n options: {\n isServer: isNodeOrEdgeCompilation,\n compilerType,\n rootDir: dir,\n pagesDir,\n appDir,\n hasReactRefresh: dev && isClient,\n nextConfig: config,\n jsConfig,\n transpilePackages: finalTranspilePackages,\n supportedBrowsers,\n swcCacheDir: path.join(dir, config?.distDir ?? '.next', 'cache', 'swc'),\n serverReferenceHashSalt: encryptionKey,\n ...extraOptions,\n } satisfies SWCLoaderOptions,\n }\n }\n\n // RSC loaders, prefer ESM, set `esm` to true\n const swcServerLayerLoader = getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.reactServerComponents,\n esm: true,\n })\n const swcSSRLayerLoader = getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.serverSideRendering,\n esm: true,\n })\n const swcBrowserLayerLoader = getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.appPagesBrowser,\n esm: true,\n })\n // Default swc loaders for pages doesn't prefer ESM.\n const swcDefaultLoader = getSwcLoader({\n serverComponents: true,\n esm: false,\n })\n\n const defaultLoaders = {\n babel: useSWCLoader ? swcDefaultLoader : babelLoader!,\n }\n\n const appServerLayerLoaders = hasAppDir\n ? [\n // When using Babel, we will have to add the SWC loader\n // as an additional pass to handle RSC correctly.\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n swcServerLayerLoader,\n babelLoader,\n reactCompilerLoader,\n ].filter(Boolean)\n : []\n\n const instrumentLayerLoaders = [\n 'next-flight-loader',\n // When using Babel, we will have to add the SWC loader\n // as an additional pass to handle RSC correctly.\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n swcServerLayerLoader,\n babelLoader,\n ].filter(Boolean)\n\n const middlewareLayerLoaders = [\n 'next-flight-loader',\n // When using Babel, we will have to use SWC to do the optimization\n // for middleware to tree shake the unused default optimized imports like \"next/server\".\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n getSwcLoader({\n serverComponents: true,\n bundleLayer: WEBPACK_LAYERS.middleware,\n }),\n babelLoader,\n ].filter(Boolean)\n\n const reactRefreshLoaders = dev && isClient ? [getReactRefreshLoader()] : []\n\n // client components layers: SSR or browser\n const createClientLayerLoader = ({\n isBrowserLayer,\n reactRefresh,\n }: {\n isBrowserLayer: boolean\n reactRefresh: boolean\n }) => [\n ...(reactRefresh ? reactRefreshLoaders : []),\n {\n // This loader handles actions and client entries\n // in the client layer.\n loader: 'next-flight-client-module-loader',\n },\n ...(hasAppDir\n ? [\n // When using Babel, we will have to add the SWC loader\n // as an additional pass to handle RSC correctly.\n // This will cause some performance overhead but\n // acceptable as Babel will not be recommended.\n isBrowserLayer ? swcBrowserLayerLoader : swcSSRLayerLoader,\n babelLoader,\n reactCompilerLoader,\n ].filter(Boolean)\n : []),\n ]\n\n const appBrowserLayerLoaders = createClientLayerLoader({\n isBrowserLayer: true,\n // reactRefresh for browser layer is applied conditionally to user-land source\n reactRefresh: false,\n })\n const appSSRLayerLoaders = createClientLayerLoader({\n isBrowserLayer: false,\n reactRefresh: true,\n })\n\n // Loader for API routes needs to be differently configured as it shouldn't\n // have RSC transpiler enabled, so syntax checks such as invalid imports won't\n // be performed.\n const apiRoutesLayerLoaders = useSWCLoader\n ? getSwcLoader({\n serverComponents: false,\n bundleLayer: WEBPACK_LAYERS.apiNode,\n })\n : defaultLoaders.babel\n\n const pageExtensions = config.pageExtensions\n\n const outputPath = isNodeOrEdgeCompilation\n ? path.join(distDir, SERVER_DIRECTORY)\n : distDir\n\n const reactServerCondition = [\n 'react-server',\n ...(isEdgeServer ? edgeConditionNames : []),\n // inherits the default conditions\n '...',\n ]\n\n const reactRefreshEntry = isRspack\n ? getRspackReactRefresh().entry\n : require.resolve(\n `next/dist/compiled/@next/react-refresh-utils/dist/runtime`\n )\n\n const clientEntries = isClient\n ? ({\n // Backwards compatibility\n 'main.js': [],\n ...(dev\n ? {\n [CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH]: reactRefreshEntry,\n [CLIENT_STATIC_FILES_RUNTIME_AMP]:\n `./` +\n path\n .relative(\n dir,\n path.join(NEXT_PROJECT_ROOT_DIST_CLIENT, 'dev', 'amp-dev')\n )\n .replace(/\\\\/g, '/'),\n }\n : {}),\n [CLIENT_STATIC_FILES_RUNTIME_MAIN]:\n `./` +\n path\n .relative(\n dir,\n path.join(\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n dev ? `next-dev.js` : 'next.js'\n )\n )\n .replace(/\\\\/g, '/'),\n ...(hasAppDir\n ? {\n [CLIENT_STATIC_FILES_RUNTIME_MAIN_APP]: dev\n ? [\n reactRefreshEntry,\n `./` +\n path\n .relative(\n dir,\n path.join(\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n 'app-next-dev.js'\n )\n )\n .replace(/\\\\/g, '/'),\n ]\n : [\n `./` +\n path\n .relative(\n dir,\n path.join(\n NEXT_PROJECT_ROOT_DIST_CLIENT,\n 'app-next.js'\n )\n )\n .replace(/\\\\/g, '/'),\n ],\n }\n : {}),\n } satisfies ClientEntries)\n : undefined\n\n const resolveConfig: webpack.Configuration['resolve'] = {\n // Disable .mjs for node_modules bundling\n extensions: ['.js', '.mjs', '.tsx', '.ts', '.jsx', '.json', '.wasm'],\n extensionAlias: config.experimental.extensionAlias,\n modules: [\n 'node_modules',\n ...nodePathList, // Support for NODE_PATH environment variable\n ],\n alias: createWebpackAliases({\n distDir,\n isClient,\n isEdgeServer,\n dev,\n config,\n pagesDir,\n appDir,\n dir,\n reactProductionProfiling,\n }),\n ...(isClient\n ? {\n fallback: {\n process: require.resolve('./polyfills/process'),\n },\n }\n : undefined),\n // default main fields use pages dir ones, and customize app router ones in loaders.\n mainFields: getMainField(compilerType, false),\n ...(isEdgeServer && {\n conditionNames: edgeConditionNames,\n }),\n plugins: [\n isNodeServer ? new OptionalPeerDependencyResolverPlugin() : undefined,\n ].filter(Boolean) as webpack.ResolvePluginInstance[],\n ...((isRspack && jsConfigPath\n ? {\n // Skip paths that are routed to a .d.ts file\n restrictions: [/^(?!.*\\.d\\.ts$).*$/],\n tsConfig: {\n configFile: jsConfigPath,\n },\n }\n : {}) as any),\n }\n\n // Packages which will be split into the 'framework' chunk.\n // Only top-level packages are included, e.g. nested copies like\n // 'node_modules/meow/node_modules/object-assign' are not included.\n const nextFrameworkPaths: string[] = []\n const topLevelFrameworkPaths: string[] = []\n const visitedFrameworkPackages = new Set<string>()\n // Adds package-paths of dependencies recursively\n const addPackagePath = (\n packageName: string,\n relativeToPath: string,\n paths: string[]\n ) => {\n try {\n if (visitedFrameworkPackages.has(packageName)) {\n return\n }\n visitedFrameworkPackages.add(packageName)\n\n const packageJsonPath = require.resolve(`${packageName}/package.json`, {\n paths: [relativeToPath],\n })\n\n // Include a trailing slash so that a `.startsWith(packagePath)` check avoids false positives\n // when one package name starts with the full name of a different package.\n // For example:\n // \"node_modules/react-slider\".startsWith(\"node_modules/react\") // true\n // \"node_modules/react-slider\".startsWith(\"node_modules/react/\") // false\n const directory = path.join(packageJsonPath, '../')\n\n // Returning from the function in case the directory has already been added and traversed\n if (paths.includes(directory)) return\n paths.push(directory)\n const dependencies = require(packageJsonPath).dependencies || {}\n for (const name of Object.keys(dependencies)) {\n addPackagePath(name, directory, paths)\n }\n } catch (_) {\n // don't error on failing to resolve framework packages\n }\n }\n\n for (const packageName of [\n 'react',\n 'react-dom',\n ...(hasAppDir\n ? [\n `next/dist/compiled/react${bundledReactChannel}`,\n `next/dist/compiled/react-dom${bundledReactChannel}`,\n ]\n : []),\n ]) {\n addPackagePath(packageName, dir, topLevelFrameworkPaths)\n }\n addPackagePath('next', dir, nextFrameworkPaths)\n\n const crossOrigin = config.crossOrigin\n\n // The `serverExternalPackages` should not conflict with\n // the `transpilePackages`.\n if (config.serverExternalPackages && finalTranspilePackages) {\n const externalPackageConflicts = finalTranspilePackages.filter((pkg) =>\n config.serverExternalPackages?.includes(pkg)\n )\n if (externalPackageConflicts.length > 0) {\n throw new Error(\n `The packages specified in the 'transpilePackages' conflict with the 'serverExternalPackages': ${externalPackageConflicts.join(\n ', '\n )}`\n )\n }\n }\n\n // For original request, such as `package name`\n const optOutBundlingPackages = EXTERNAL_PACKAGES.concat(\n ...(config.serverExternalPackages || [])\n ).filter((pkg) => !finalTranspilePackages?.includes(pkg))\n // For resolved request, such as `absolute path/package name/foo/bar.js`\n const optOutBundlingPackageRegex = new RegExp(\n `[/\\\\\\\\]node_modules[/\\\\\\\\](${optOutBundlingPackages\n .map((p) => p.replace(/\\//g, '[/\\\\\\\\]'))\n .join('|')})[/\\\\\\\\]`\n )\n\n const transpilePackagesRegex = new RegExp(\n `[/\\\\\\\\]node_modules[/\\\\\\\\](${finalTranspilePackages\n ?.map((p) => p.replace(/\\//g, '[/\\\\\\\\]'))\n .join('|')})[/\\\\\\\\]`\n )\n\n const handleExternals = makeExternalHandler({\n config,\n optOutBundlingPackageRegex,\n transpiledPackages: finalTranspilePackages,\n dir,\n })\n\n const pageExtensionsRegex = new RegExp(`\\\\.(${pageExtensions.join('|')})$`)\n\n const aliasCodeConditionTest = [codeCondition.test, pageExtensionsRegex]\n\n const builtinModules = (require('module') as typeof import('module'))\n .builtinModules\n\n const bunExternals = [\n 'bun:ffi',\n 'bun:jsc',\n 'bun:sqlite',\n 'bun:test',\n 'bun:wrap',\n 'bun',\n ]\n\n const shouldEnableSlowModuleDetection =\n !!config.experimental.slowModuleDetection && dev\n\n const getParallelism = () => {\n const override = Number(process.env.NEXT_WEBPACK_PARALLELISM)\n if (shouldEnableSlowModuleDetection) {\n if (override) {\n console.warn(\n 'NEXT_WEBPACK_PARALLELISM is specified but will be ignored due to experimental.slowModuleDetection being enabled.'\n )\n }\n return 1\n }\n return override || undefined\n }\n\n const telemetryPlugin =\n !dev &&\n isClient &&\n new (\n require('./webpack/plugins/telemetry-plugin/telemetry-plugin') as typeof import('./webpack/plugins/telemetry-plugin/telemetry-plugin')\n ).TelemetryPlugin(\n new Map(\n [\n ['swcLoader', useSWCLoader],\n ['swcRelay', !!config.compiler?.relay],\n ['swcStyledComponents', !!config.compiler?.styledComponents],\n [\n 'swcReactRemoveProperties',\n !!config.compiler?.reactRemoveProperties,\n ],\n [\n 'swcExperimentalDecorators',\n !!jsConfig?.compilerOptions?.experimentalDecorators,\n ],\n ['swcRemoveConsole', !!config.compiler?.removeConsole],\n ['swcImportSource', !!jsConfig?.compilerOptions?.jsxImportSource],\n ['swcEmotion', !!config.compiler?.emotion],\n ['transpilePackages', !!config.transpilePackages],\n ['skipMiddlewareUrlNormalize', !!config.skipMiddlewareUrlNormalize],\n ['skipTrailingSlashRedirect', !!config.skipTrailingSlashRedirect],\n ['modularizeImports', !!config.modularizeImports],\n // If esmExternals is not same as default value, it represents customized usage\n ['esmExternals', config.experimental.esmExternals !== true],\n SWCBinaryTarget,\n ].filter<[Feature, boolean]>(Boolean as any)\n )\n )\n\n let webpackConfig: webpack.Configuration = {\n parallelism: getParallelism(),\n ...(isNodeServer ? { externalsPresets: { node: true } } : {}),\n // @ts-ignore\n externals:\n isClient || isEdgeServer\n ? // make sure importing \"next\" is handled gracefully for client\n // bundles in case a user imported types and it wasn't removed\n // TODO: should we warn/error for this instead?\n [\n 'next',\n ...(isEdgeServer\n ? [\n {\n '@builder.io/partytown': '{}',\n 'next/dist/compiled/etag': '{}',\n },\n getEdgePolyfilledModules(),\n handleWebpackExternalForEdgeRuntime,\n ]\n : []),\n ]\n : [\n ...builtinModules,\n ...bunExternals,\n ({\n context,\n request,\n dependencyType,\n contextInfo,\n getResolve,\n }: {\n context: string\n request: string\n dependencyType: string\n contextInfo: {\n issuer: string\n issuerLayer: string | null\n compiler: string\n }\n getResolve: (\n options: any\n ) => (\n resolveContext: string,\n resolveRequest: string,\n callback: (\n err?: Error,\n result?: string,\n resolveData?: { descriptionFileData?: { type?: any } }\n ) => void\n ) => void\n }) =>\n handleExternals(\n context,\n request,\n dependencyType,\n contextInfo.issuerLayer as WebpackLayerName,\n (options) => {\n const resolveFunction = getResolve(options)\n return (resolveContext: string, requestToResolve: string) =>\n new Promise((resolve, reject) => {\n resolveFunction(\n resolveContext,\n requestToResolve,\n (err, result, resolveData) => {\n if (err) return reject(err)\n if (!result) return resolve([null, false])\n const isEsm = /\\.js$/i.test(result)\n ? resolveData?.descriptionFileData?.type ===\n 'module'\n : /\\.mjs$/i.test(result)\n resolve([result, isEsm])\n }\n )\n })\n }\n ),\n ],\n\n optimization: {\n emitOnErrors: !dev,\n checkWasmTypes: false,\n nodeEnv: false,\n\n splitChunks: (():\n | Required<webpack.Configuration>['optimization']['splitChunks']\n | false => {\n // server chunking\n if (dev) {\n if (isNodeServer) {\n /*\n In development, we want to split code that comes from `node_modules` into their own chunks.\n This is because in development, we often need to reload the user bundle due to changes in the code.\n To work around this, we put all the vendor code into separate chunks so that we don't need to reload them.\n This is safe because the vendor code doesn't change between reloads.\n */\n const extractRootNodeModule = (modulePath: string) => {\n // This regex is used to extract the root node module name to be used as the chunk group name.\n // example: ../../node_modules/.pnpm/next@10/foo/node_modules/bar -> next@10\n const regex =\n /node_modules(?:\\/|\\\\)\\.?(?:pnpm(?:\\/|\\\\))?([^/\\\\]+)/\n const match = modulePath.match(regex)\n return match ? match[1] : null\n }\n return {\n cacheGroups: {\n // this chunk configuration gives us a separate chunk for each top level module in node_modules\n // or a hashed chunk if we can't extract the module name.\n vendor: {\n chunks: 'all',\n reuseExistingChunk: true,\n test: /[\\\\/]node_modules[\\\\/]/,\n minSize: 0,\n minChunks: 1,\n maxAsyncRequests: 300,\n maxInitialRequests: 300,\n name: (module: webpack.Module) => {\n const moduleId = module.nameForCondition()!\n const rootModule = extractRootNodeModule(moduleId)\n if (rootModule) {\n return `vendor-chunks/${rootModule}`\n } else {\n const hash = crypto.createHash('sha1').update(moduleId)\n hash.update(moduleId)\n return `vendor-chunks/${hash.digest('hex')}`\n }\n },\n },\n // disable the default chunk groups\n default: false,\n defaultVendors: false,\n },\n }\n }\n\n return false\n }\n\n if (isNodeServer || isEdgeServer) {\n return {\n filename: `${isEdgeServer ? `edge-chunks/` : ''}[name].js`,\n chunks: 'all',\n minChunks: 2,\n }\n }\n\n const frameworkCacheGroup = {\n chunks: 'all' as const,\n name: 'framework',\n // Ensures the framework chunk is not created for App Router.\n layer: isWebpackDefaultLayer,\n test(module: any) {\n const resource = module.nameForCondition?.()\n return resource\n ? topLevelFrameworkPaths.some((pkgPath) =>\n resource.startsWith(pkgPath)\n )\n : false\n },\n priority: 40,\n // Don't let webpack eliminate this chunk (prevents this chunk from\n // becoming a part of the commons chunk)\n enforce: true,\n }\n\n const libCacheGroup = {\n test(module: {\n type: string\n size: Function\n nameForCondition: Function\n }): boolean {\n return (\n !module.type?.startsWith('css') &&\n module.size() > 160000 &&\n /node_modules[/\\\\]/.test(module.nameForCondition() || '')\n )\n },\n name(module: {\n layer: string | null | undefined\n type: string\n libIdent?: Function\n updateHash: (hash: crypto.Hash) => void\n }): string {\n const hash = crypto.createHash('sha1')\n if (isModuleCSS(module)) {\n module.updateHash(hash)\n } else {\n if (!module.libIdent) {\n throw new Error(\n `Encountered unknown module type: ${module.type}. Please open an issue.`\n )\n }\n hash.update(module.libIdent({ context: dir }))\n }\n\n // Ensures the name of the chunk is not the same between two modules in different layers\n // E.g. if you import 'button-library' in App Router and Pages Router we don't want these to be bundled in the same chunk\n // as they're never used on the same page.\n if (module.layer) {\n hash.update(module.layer)\n }\n\n return hash.digest('hex').substring(0, 8)\n },\n priority: 30,\n minChunks: 1,\n reuseExistingChunk: true,\n }\n\n // client chunking\n return {\n // Keep main and _app chunks unsplitted in webpack 5\n // as we don't need a separate vendor chunk from that\n // and all other chunk depend on them so there is no\n // duplication that need to be pulled out.\n chunks: isRspack\n ? // using a function here causes noticable slowdown\n // in rspack\n /(?!polyfills|main|pages\\/_app)/\n : (chunk: any) =>\n !/^(polyfills|main|pages\\/_app)$/.test(chunk.name),\n\n cacheGroups: isRspack\n ? {\n framework: {\n chunks: 'all' as const,\n name: 'framework',\n layer: RSPACK_DEFAULT_LAYERS_REGEX,\n test: /[/]node_modules[/](react|react-dom|next[/]dist[/]compiled[/](react|react-dom)(-experimental)?)[/]/,\n priority: 40,\n enforce: true,\n },\n lib: {\n test: /[/]node_modules[/](?!.*\\.(css|scss|sass|less|styl)$)/,\n name: 'lib',\n chunks: 'all',\n priority: 30,\n minChunks: 1,\n reuseExistingChunk: true,\n },\n }\n : {\n framework: frameworkCacheGroup,\n lib: libCacheGroup,\n },\n maxInitialRequests: 25,\n minSize: 20000,\n }\n })(),\n runtimeChunk: isClient\n ? { name: CLIENT_STATIC_FILES_RUNTIME_WEBPACK }\n : undefined,\n\n minimize:\n !dev &&\n (isClient ||\n isEdgeServer ||\n (isNodeServer && config.experimental.serverMinification)),\n minimizer: [\n // Minify JavaScript\n isRspack\n ? new (getRspackCore().SwcJsMinimizerRspackPlugin)({\n // JS minimizer configuration\n // options should align with crates/napi/src/minify.rs#patch_opts\n minimizerOptions: {\n compress: {\n inline: 2,\n global_defs: {\n 'process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE': false,\n },\n },\n mangle: !noMangling && {\n reserved: ['AbortSignal'],\n disableCharFreq: !isClient,\n },\n },\n })\n : (compiler: webpack.Compiler) => {\n // @ts-ignore No typings yet\n const { MinifyPlugin } =\n require('./webpack/plugins/minify-webpack-plugin/src') as typeof import('./webpack/plugins/minify-webpack-plugin/src')\n new MinifyPlugin({\n noMangling,\n disableCharFreq: !isClient,\n }).apply(compiler)\n },\n // Minify CSS\n // By default, Rspack uses LightningCSS for CSS minification.\n // Rspack uses css-minimizer-plugin by default for compatibility.\n isRspack &&\n (process.env.__NEXT_TEST_MODE\n ? config.experimental.useLightningcss\n : config.experimental?.useLightningcss === undefined ||\n config.experimental.useLightningcss)\n ? new (getRspackCore().LightningCssMinimizerRspackPlugin)({\n // CSS minimizer configuration\n minimizerOptions: {\n targets: supportedBrowsers,\n },\n })\n : (compiler: webpack.Compiler) => {\n const { CssMinimizerPlugin } =\n require('./webpack/plugins/css-minimizer-plugin') as typeof import('./webpack/plugins/css-minimizer-plugin')\n new CssMinimizerPlugin({\n postcssOptions: {\n map: {\n // `inline: false` generates the source map in a separate file.\n // Otherwise, the CSS file is needlessly large.\n inline: false,\n // `annotation: false` skips appending the `sourceMappingURL`\n // to the end of the CSS file. Webpack already handles this.\n annotation: false,\n },\n },\n }).apply(compiler)\n },\n ],\n },\n context: dir,\n // Kept as function to be backwards compatible\n entry: async () => {\n return {\n ...(clientEntries ? clientEntries : {}),\n ...entrypoints,\n }\n },\n watchOptions: Object.freeze({\n ...baseWatchOptions,\n poll: config.watchOptions?.pollIntervalMs,\n }),\n output: {\n // we must set publicPath to an empty value to override the default of\n // auto which doesn't work in IE11\n publicPath: `${\n config.assetPrefix\n ? config.assetPrefix.endsWith('/')\n ? config.assetPrefix.slice(0, -1)\n : config.assetPrefix\n : ''\n }/_next/`,\n path: !dev && isNodeServer ? path.join(outputPath, 'chunks') : outputPath,\n // On the server we don't use hashes\n filename: isNodeOrEdgeCompilation\n ? dev || isEdgeServer\n ? `[name].js`\n : `../[name].js`\n : `static/chunks/${isDevFallback ? 'fallback/' : ''}[name]${\n dev ? '' : '-[contenthash]'\n }.js`,\n library: isClient || isEdgeServer ? '_N_E' : undefined,\n libraryTarget: isClient || isEdgeServer ? 'assign' : 'commonjs2',\n hotUpdateChunkFilename: 'static/webpack/[id].[fullhash].hot-update.js',\n hotUpdateMainFilename:\n 'static/webpack/[fullhash].[runtime].hot-update.json',\n // This saves chunks with the name given via `import()`\n chunkFilename: isNodeOrEdgeCompilation\n ? '[name].js'\n : `static/chunks/${isDevFallback ? 'fallback/' : ''}${\n dev ? '[name]' : '[name].[contenthash]'\n }.js`,\n strictModuleExceptionHandling: true,\n crossOriginLoading: crossOrigin,\n // if `sources[number]` is not an absolute path, it's is resolved\n // relative to the location of the source map file (https://tc39.es/source-map/#resolving-sources).\n // However, Webpack's `resource-path` is relative to the app dir.\n // TODO: Either `sourceRoot` should be populated with the root and then we can use `[resource-path]`\n // or we need a way to resolve return `path.relative(sourceMapLocation, info.resourcePath)`\n devtoolModuleFilenameTemplate: dev\n ? '[absolute-resource-path]'\n : undefined,\n webassemblyModuleFilename: 'static/wasm/[modulehash].wasm',\n hashFunction: 'xxhash64',\n hashDigestLength: 16,\n },\n performance: false,\n resolve: resolveConfig,\n resolveLoader: {\n // The loaders Next.js provides\n alias: [\n 'error-loader',\n 'next-swc-loader',\n 'next-client-pages-loader',\n 'next-image-loader',\n 'next-metadata-image-loader',\n 'next-style-loader',\n 'next-flight-loader',\n 'next-flight-client-entry-loader',\n 'next-flight-action-entry-loader',\n 'next-flight-client-module-loader',\n 'next-flight-server-reference-proxy-loader',\n 'empty-loader',\n 'next-middleware-loader',\n 'next-edge-function-loader',\n 'next-edge-app-route-loader',\n 'next-edge-ssr-loader',\n 'next-middleware-asset-loader',\n 'next-middleware-wasm-loader',\n 'next-app-loader',\n 'next-route-loader',\n 'next-font-loader',\n 'next-invalid-import-error-loader',\n 'next-metadata-route-loader',\n 'modularize-import-loader',\n 'next-barrel-loader',\n 'next-error-browser-binary-loader',\n 'next-root-params-loader',\n ].reduce(\n (alias, loader) => {\n // using multiple aliases to replace `resolveLoader.modules`\n alias[loader] = path.join(__dirname, 'webpack', 'loaders', loader)\n\n return alias\n },\n {} as Record<string, string>\n ),\n modules: [\n 'node_modules',\n ...nodePathList, // Support for NODE_PATH environment variable\n ],\n plugins: [],\n },\n module: {\n rules: [\n // Alias server-only and client-only to proper exports based on bundling layers\n {\n issuerLayer: {\n or: [\n ...WEBPACK_LAYERS.GROUP.serverOnly,\n ...WEBPACK_LAYERS.GROUP.neutralTarget,\n ],\n },\n resolve: {\n // Error on client-only but allow server-only\n alias: createServerOnlyClientOnlyAliases(true),\n },\n },\n {\n issuerLayer: {\n not: [\n ...WEBPACK_LAYERS.GROUP.serverOnly,\n ...WEBPACK_LAYERS.GROUP.neutralTarget,\n ],\n },\n resolve: {\n // Error on server-only but allow client-only\n alias: createServerOnlyClientOnlyAliases(false),\n },\n },\n // Detect server-only / client-only imports and error in build time\n {\n test: [\n /^client-only$/,\n /next[\\\\/]dist[\\\\/]compiled[\\\\/]client-only[\\\\/]error/,\n ],\n loader: 'next-invalid-import-error-loader',\n issuerLayer: {\n or: WEBPACK_LAYERS.GROUP.serverOnly,\n },\n options: {\n message:\n \"'client-only' cannot be imported from a Server Component module. It should only be used from a Client Component.\",\n },\n },\n {\n test: [\n /^server-only$/,\n /next[\\\\/]dist[\\\\/]compiled[\\\\/]server-only[\\\\/]index/,\n ],\n loader: 'next-invalid-import-error-loader',\n issuerLayer: {\n not: [\n ...WEBPACK_LAYERS.GROUP.serverOnly,\n ...WEBPACK_LAYERS.GROUP.neutralTarget,\n ],\n },\n options: {\n message:\n \"'server-only' cannot be imported from a Client Component module. It should only be used from a Server Component.\",\n },\n },\n // Potential the bundle introduced into middleware and api can be poisoned by client-only\n // but not being used, so we disabled the `client-only` erroring on these layers.\n // `server-only` is still available.\n {\n test: [\n /^client-only$/,\n /next[\\\\/]dist[\\\\/]compiled[\\\\/]client-only[\\\\/]error/,\n ],\n loader: 'empty-loader',\n issuerLayer: {\n or: WEBPACK_LAYERS.GROUP.neutralTarget,\n },\n },\n ...(isNodeServer\n ? []\n : [\n {\n test: /[\\\\/].*?\\.node$/,\n loader: 'next-error-browser-binary-loader',\n },\n ]),\n ...(hasAppDir\n ? [\n {\n // Make sure that AsyncLocalStorage module instance is shared between server and client\n // layers.\n layer: WEBPACK_LAYERS.shared,\n test: asyncStoragesRegex,\n },\n // Convert metadata routes to separate layer\n {\n resourceQuery: new RegExp(\n WEBPACK_RESOURCE_QUERIES.metadataRoute\n ),\n layer: WEBPACK_LAYERS.reactServerComponents,\n },\n {\n // Ensure that the app page module is in the client layers, this\n // enables React to work correctly for RSC.\n layer: WEBPACK_LAYERS.serverSideRendering,\n test: /next[\\\\/]dist[\\\\/](esm[\\\\/])?server[\\\\/]route-modules[\\\\/]app-page[\\\\/]module/,\n },\n {\n issuerLayer: isWebpackBundledLayer,\n resolve: {\n alias: createNextApiEsmAliases(),\n },\n },\n {\n issuerLayer: shouldUseReactServerCondition,\n resolve: {\n alias: createAppRouterApiAliases(true),\n },\n },\n {\n issuerLayer: isWebpackClientOnlyLayer,\n resolve: {\n alias: createAppRouterApiAliases(false),\n },\n },\n ]\n : []),\n ...(hasAppDir && !isClient\n ? [\n {\n issuerLayer: shouldUseReactServerCondition,\n test: {\n // Resolve it if it is a source code file, and it has NOT been\n // opted out of bundling.\n and: [\n aliasCodeConditionTest,\n {\n not: [optOutBundlingPackageRegex, asyncStoragesRegex],\n },\n ],\n },\n resourceQuery: {\n // Do not apply next-flight-loader to imports generated by the\n // next-metadata-image-loader, to avoid generating unnecessary\n // and conflicting entries in the flight client entry plugin.\n // These are already covered by the next-metadata-route-loader\n // entries.\n not: [\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadata),\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadataImageMeta),\n ],\n },\n resolve: {\n mainFields: getMainField(compilerType, true),\n conditionNames: reactServerCondition,\n // If missing the alias override here, the default alias will be used which aliases\n // react to the direct file path, not the package name. In that case the condition\n // will be ignored completely.\n alias: createVendoredReactAliases(bundledReactChannel, {\n // No server components profiling\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.reactServerComponents,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n use: 'next-flight-loader',\n },\n ]\n : []),\n\n ...getNextRootParamsRules({\n isRootParamsEnabled:\n config.experimental.rootParams ??\n // `experimental.dynamicIO` implies `experimental.rootParams`.\n config.experimental.cacheComponents ??\n false,\n isClient,\n appDir,\n pageExtensions,\n }),\n\n // TODO: FIXME: do NOT webpack 5 support with this\n // x-ref: https://github.com/webpack/webpack/issues/11467\n ...(!config.experimental.fullySpecified\n ? [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n } as any,\n ]\n : []),\n ...(hasAppDir && isEdgeServer\n ? [\n // The Edge bundle includes the server in its entrypoint, so it has to\n // be in the SSR layer — here we convert the actual page request to\n // the RSC layer via a webpack rule.\n {\n resourceQuery: new RegExp(\n WEBPACK_RESOURCE_QUERIES.edgeSSREntry\n ),\n layer: WEBPACK_LAYERS.reactServerComponents,\n },\n ]\n : []),\n ...(hasAppDir\n ? [\n {\n // Alias react-dom for ReactDOM.preload usage.\n // Alias react for switching between default set and share subset.\n oneOf: [\n {\n issuerLayer: shouldUseReactServerCondition,\n test: {\n // Resolve it if it is a source code file, and it has NOT been\n // opted out of bundling.\n and: [\n aliasCodeConditionTest,\n {\n not: [optOutBundlingPackageRegex, asyncStoragesRegex],\n },\n ],\n },\n resolve: {\n // It needs `conditionNames` here to require the proper asset,\n // when react is acting as dependency of compiled/react-dom.\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.reactServerComponents,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n {\n test: aliasCodeConditionTest,\n issuerLayer: WEBPACK_LAYERS.serverSideRendering,\n resolve: {\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.serverSideRendering,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n ],\n },\n {\n test: aliasCodeConditionTest,\n issuerLayer: WEBPACK_LAYERS.appPagesBrowser,\n resolve: {\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.appPagesBrowser,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n ]\n : []),\n // Do not apply react-refresh-loader to node_modules for app router browser layer\n ...(hasAppDir && dev && isClient\n ? [\n {\n test: codeCondition.test,\n exclude: [\n // exclude unchanged modules from react-refresh\n codeCondition.exclude,\n transpilePackagesRegex,\n precompileRegex,\n ],\n issuerLayer: WEBPACK_LAYERS.appPagesBrowser,\n use: reactRefreshLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n },\n },\n ]\n : []),\n {\n oneOf: [\n {\n ...codeCondition,\n issuerLayer: WEBPACK_LAYERS.apiNode,\n use: apiRoutesLayerLoaders,\n // In Node.js, switch back to normal URL handling.\n // We won't bundle `new URL()` cases in Node.js bundler layer.\n parser: {\n url: true,\n },\n },\n {\n ...codeCondition,\n issuerLayer: WEBPACK_LAYERS.apiEdge,\n use: apiRoutesLayerLoaders,\n // In Edge runtime, we leave the url handling by default.\n // The new URL assets will be converted into edge assets through assets loader.\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.middleware,\n use: middlewareLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n conditionNames: reactServerCondition,\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.middleware,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.instrument,\n use: instrumentLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n conditionNames: reactServerCondition,\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer: WEBPACK_LAYERS.instrument,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n },\n ...(hasAppDir\n ? [\n {\n test: codeCondition.test,\n issuerLayer: shouldUseReactServerCondition,\n exclude: asyncStoragesRegex,\n use: appServerLayerLoaders,\n },\n {\n test: codeCondition.test,\n resourceQuery: new RegExp(\n WEBPACK_RESOURCE_QUERIES.edgeSSREntry\n ),\n use: appServerLayerLoaders,\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.appPagesBrowser,\n // Exclude the transpilation of the app layer due to compilation issues\n exclude: browserNonTranspileModules,\n use: appBrowserLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n },\n },\n {\n test: codeCondition.test,\n issuerLayer: WEBPACK_LAYERS.serverSideRendering,\n exclude: asyncStoragesRegex,\n use: appSSRLayerLoaders,\n resolve: {\n mainFields: getMainField(compilerType, true),\n },\n },\n ]\n : []),\n {\n ...codeCondition,\n use: [\n ...reactRefreshLoaders,\n defaultLoaders.babel,\n reactCompilerLoader,\n ].filter(Boolean),\n },\n ],\n },\n\n ...(!config.images.disableStaticImages\n ? [\n {\n test: nextImageLoaderRegex,\n loader: 'next-image-loader',\n issuer: { not: regexLikeCss },\n dependency: { not: ['url'] },\n resourceQuery: {\n not: [\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadata),\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadataRoute),\n new RegExp(WEBPACK_RESOURCE_QUERIES.metadataImageMeta),\n ],\n },\n options: {\n isDev: dev,\n compilerType,\n basePath: config.basePath,\n assetPrefix: config.assetPrefix,\n },\n },\n ]\n : []),\n ...(isEdgeServer\n ? [\n {\n resolve: {\n fallback: {\n process: require.resolve('./polyfills/process'),\n },\n },\n },\n ]\n : isClient\n ? [\n {\n resolve: {\n fallback:\n config.experimental.fallbackNodePolyfills === false\n ? {\n assert: false,\n buffer: false,\n constants: false,\n crypto: false,\n domain: false,\n http: false,\n https: false,\n os: false,\n path: false,\n punycode: false,\n process: false,\n querystring: false,\n stream: false,\n string_decoder: false,\n sys: false,\n timers: false,\n tty: false,\n util: false,\n vm: false,\n zlib: false,\n events: false,\n setImmediate: false,\n }\n : {\n assert: require.resolve(\n 'next/dist/compiled/assert'\n ),\n buffer: require.resolve(\n 'next/dist/compiled/buffer'\n ),\n constants: require.resolve(\n 'next/dist/compiled/constants-browserify'\n ),\n crypto: require.resolve(\n 'next/dist/compiled/crypto-browserify'\n ),\n domain: require.resolve(\n 'next/dist/compiled/domain-browser'\n ),\n http: require.resolve(\n 'next/dist/compiled/stream-http'\n ),\n https: require.resolve(\n 'next/dist/compiled/https-browserify'\n ),\n os: require.resolve(\n 'next/dist/compiled/os-browserify'\n ),\n path: require.resolve(\n 'next/dist/compiled/path-browserify'\n ),\n punycode: require.resolve(\n 'next/dist/compiled/punycode'\n ),\n process: require.resolve('./polyfills/process'),\n // Handled in separate alias\n querystring: require.resolve(\n 'next/dist/compiled/querystring-es3'\n ),\n stream: require.resolve(\n 'next/dist/compiled/stream-browserify'\n ),\n string_decoder: require.resolve(\n 'next/dist/compiled/string_decoder'\n ),\n sys: require.resolve('next/dist/compiled/util'),\n timers: require.resolve(\n 'next/dist/compiled/timers-browserify'\n ),\n tty: require.resolve(\n 'next/dist/compiled/tty-browserify'\n ),\n // Handled in separate alias\n // url: require.resolve('url'),\n util: require.resolve('next/dist/compiled/util'),\n vm: require.resolve(\n 'next/dist/compiled/vm-browserify'\n ),\n zlib: require.resolve(\n 'next/dist/compiled/browserify-zlib'\n ),\n events: require.resolve(\n 'next/dist/compiled/events'\n ),\n setImmediate: require.resolve(\n 'next/dist/compiled/setimmediate'\n ),\n },\n },\n },\n ]\n : []),\n {\n // Mark `image-response.js` as side-effects free to make sure we can\n // tree-shake it if not used.\n test: /[\\\\/]next[\\\\/]dist[\\\\/](esm[\\\\/])?server[\\\\/]og[\\\\/]image-response\\.js/,\n sideEffects: false,\n },\n // Mark the action-client-wrapper module as side-effects free to make sure\n // the individual transformed module of client action can be tree-shaken.\n // This will make modules processed by `next-flight-server-reference-proxy-loader` become side-effects free,\n // then on client side the module ids will become tree-shakable.\n // e.g. the output of client action module will look like:\n // `export { a } from 'next-flight-server-reference-proxy-loader?id=idOfA&name=a!\n // `export { b } from 'next-flight-server-reference-proxy-loader?id=idOfB&name=b!\n {\n test: /[\\\\/]next[\\\\/]dist[\\\\/](esm[\\\\/])?build[\\\\/]webpack[\\\\/]loaders[\\\\/]next-flight-loader[\\\\/]action-client-wrapper\\.js/,\n sideEffects: false,\n },\n {\n // This loader rule should be before other rules, as it can output code\n // that still contains `\"use client\"` or `\"use server\"` statements that\n // needs to be re-transformed by the RSC compilers.\n // This loader rule works like a bridge between user's import and\n // the target module behind a package's barrel file. It reads SWC's\n // analysis result from the previous loader, and directly returns the\n // code that only exports values that are asked by the user.\n test: /__barrel_optimize__/,\n use: ({ resourceQuery }: { resourceQuery: string }) => {\n const names = (\n resourceQuery.match(/\\?names=([^&]+)/)?.[1] || ''\n ).split(',')\n\n return [\n {\n loader: 'next-barrel-loader',\n options: {\n names,\n swcCacheDir: path.join(\n dir,\n config?.distDir ?? '.next',\n 'cache',\n 'swc'\n ),\n },\n // This is part of the request value to serve as the module key.\n // The barrel loader are no-op re-exported modules keyed by\n // export names.\n ident: 'next-barrel-loader:' + resourceQuery,\n },\n ]\n },\n },\n {\n resolve: {\n alias: {\n next: NEXT_PROJECT_ROOT,\n },\n },\n },\n ],\n },\n plugins: [\n isNodeServer &&\n new bundler.NormalModuleReplacementPlugin(\n /\\.\\/(.+)\\.shared-runtime$/,\n function (resource) {\n const moduleName = path.basename(\n resource.request,\n '.shared-runtime'\n )\n const layer = resource.contextInfo.issuerLayer\n let runtime\n\n switch (layer) {\n case WEBPACK_LAYERS.serverSideRendering:\n case WEBPACK_LAYERS.reactServerComponents:\n case WEBPACK_LAYERS.appPagesBrowser:\n case WEBPACK_LAYERS.actionBrowser:\n runtime = 'app-page'\n break\n case null:\n case undefined:\n default:\n runtime = 'pages'\n }\n resource.request = `next/dist/server/route-modules/${runtime}/vendored/contexts/${moduleName}`\n }\n ),\n dev && new MemoryWithGcCachePlugin({ maxGenerations: 5 }),\n dev &&\n isClient &&\n (isRspack\n ? // eslint-disable-next-line\n new (getRspackReactRefresh() as any)({\n injectLoader: false,\n injectEntry: false,\n overlay: false,\n })\n : new ReactRefreshWebpackPlugin(webpack)),\n // Makes sure `Buffer` and `process` are polyfilled in client and flight bundles (same behavior as webpack 4)\n (isClient || isEdgeServer) &&\n new bundler.ProvidePlugin({\n // Buffer is used by getInlineScriptSource\n Buffer: [require.resolve('buffer'), 'Buffer'],\n // Avoid process being overridden when in web run time\n ...(isClient && { process: [require.resolve('process')] }),\n }),\n\n new (getWebpackBundler().DefinePlugin)(\n getDefineEnv({\n isTurbopack: false,\n config,\n dev,\n distDir,\n projectPath: dir,\n fetchCacheKeyPrefix,\n hasRewrites,\n isClient,\n isEdgeServer,\n isNodeServer,\n middlewareMatchers,\n omitNonDeterministic: isCompileMode,\n rewrites,\n })\n ),\n isClient &&\n new ReactLoadablePlugin({\n filename: REACT_LOADABLE_MANIFEST,\n pagesDir,\n appDir,\n runtimeAsset: `server/${MIDDLEWARE_REACT_LOADABLE_MANIFEST}.js`,\n dev,\n }),\n // rspack doesn't support the parser hooks used here\n !isRspack && (isClient || isEdgeServer) && new DropClientPage(),\n isNodeServer &&\n !dev &&\n new ((\n require('./webpack/plugins/next-trace-entrypoints-plugin') as typeof import('./webpack/plugins/next-trace-entrypoints-plugin')\n )\n .TraceEntryPointsPlugin as typeof import('./webpack/plugins/next-trace-entrypoints-plugin').TraceEntryPointsPlugin)(\n {\n rootDir: dir,\n appDir: appDir,\n pagesDir: pagesDir,\n esmExternals: config.experimental.esmExternals,\n outputFileTracingRoot: config.outputFileTracingRoot,\n appDirEnabled: hasAppDir,\n traceIgnores: [],\n compilerType,\n }\n ),\n // Moment.js is an extremely popular library that bundles large locale files\n // by default due to how Webpack interprets its code. This is a practical\n // solution that requires the user to opt into importing specific locales.\n // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n config.excludeDefaultMomentLocales &&\n new bundler.IgnorePlugin({\n resourceRegExp: /^\\.\\/locale$/,\n contextRegExp: /moment$/,\n }),\n ...(dev\n ? (() => {\n // Even though require.cache is server only we have to clear assets from both compilations\n // This is because the client compilation generates the build manifest that's used on the server side\n const { NextJsRequireCacheHotReloader } =\n require('./webpack/plugins/nextjs-require-cache-hot-reloader') as typeof import('./webpack/plugins/nextjs-require-cache-hot-reloader')\n const devPlugins: any[] = [\n new NextJsRequireCacheHotReloader({\n serverComponents: hasAppDir,\n }),\n ]\n\n if (isClient || isEdgeServer) {\n devPlugins.push(new bundler.HotModuleReplacementPlugin())\n }\n\n return devPlugins\n })()\n : []),\n !dev &&\n new bundler.IgnorePlugin({\n resourceRegExp: /react-is/,\n contextRegExp: /next[\\\\/]dist[\\\\/]/,\n }),\n isNodeOrEdgeCompilation &&\n new PagesManifestPlugin({\n dev,\n appDirEnabled: hasAppDir,\n isEdgeRuntime: isEdgeServer,\n distDir: !dev ? distDir : undefined,\n }),\n // MiddlewarePlugin should be after DefinePlugin so NEXT_PUBLIC_*\n // replacement is done before its process.env.* handling\n isEdgeServer &&\n new MiddlewarePlugin({\n dev,\n sriEnabled: !dev && !!config.experimental.sri?.algorithm,\n rewrites,\n edgeEnvironments: {\n __NEXT_BUILD_ID: buildId,\n NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: encryptionKey,\n __NEXT_PREVIEW_MODE_ID: previewProps.previewModeId,\n __NEXT_PREVIEW_MODE_SIGNING_KEY: previewProps.previewModeSigningKey,\n __NEXT_PREVIEW_MODE_ENCRYPTION_KEY:\n previewProps.previewModeEncryptionKey,\n },\n }),\n isClient &&\n new BuildManifestPlugin({\n buildId,\n rewrites,\n isDevFallback,\n appDirEnabled: hasAppDir,\n clientRouterFilters,\n }),\n isRspack\n ? new RspackProfilingPlugin({ runWebpackSpan })\n : new ProfilingPlugin({ runWebpackSpan, rootDir: dir }),\n new WellKnownErrorsPlugin(),\n isClient &&\n new CopyFilePlugin({\n // file path to build output of `@next/polyfill-nomodule`\n filePath: require.resolve('./polyfills/polyfill-nomodule'),\n cacheKey: process.env.__NEXT_VERSION as string,\n name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,\n minimize: false,\n info: {\n [CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL]: 1,\n // This file is already minified\n minimized: true,\n },\n }),\n hasAppDir && isClient && new AppBuildManifestPlugin({ dev }),\n hasAppDir &&\n (isClient\n ? new ClientReferenceManifestPlugin({\n dev,\n appDir,\n experimentalInlineCss: !!config.experimental.inlineCss,\n })\n : new FlightClientEntryPlugin({\n appDir,\n dev,\n isEdgeServer,\n encryptionKey,\n })),\n hasAppDir &&\n !isClient &&\n new NextTypesPlugin({\n dir,\n distDir: config.distDir,\n appDir,\n dev,\n isEdgeServer,\n pageExtensions: config.pageExtensions,\n typedRoutes: enableTypedRoutes,\n cacheLifeConfig: config.experimental.cacheLife,\n originalRewrites,\n originalRedirects,\n }),\n !dev &&\n isClient &&\n !!config.experimental.sri?.algorithm &&\n new SubresourceIntegrityPlugin(config.experimental.sri.algorithm),\n isClient &&\n new NextFontManifestPlugin({\n appDir,\n }),\n !dev &&\n isClient &&\n config.experimental.cssChunking &&\n (isRspack\n ? new (getRspackCore().experiments.CssChunkingPlugin)({\n strict: config.experimental.cssChunking === 'strict',\n nextjs: true,\n })\n : new CssChunkingPlugin(\n config.experimental.cssChunking === 'strict'\n )),\n telemetryPlugin,\n !dev &&\n isNodeServer &&\n new (\n require('./webpack/plugins/telemetry-plugin/telemetry-plugin') as typeof import('./webpack/plugins/telemetry-plugin/telemetry-plugin')\n ).TelemetryPlugin(new Map()),\n shouldEnableSlowModuleDetection &&\n new (\n require('./webpack/plugins/slow-module-detection-plugin') as typeof import('./webpack/plugins/slow-module-detection-plugin')\n ).default({\n compilerType,\n ...config.experimental.slowModuleDetection!,\n }),\n ].filter(Boolean as any as ExcludesFalse),\n }\n\n // Support tsconfig and jsconfig baseUrl\n // Only add the baseUrl if it's explicitly set in tsconfig/jsconfig\n if (resolvedBaseUrl && !resolvedBaseUrl.isImplicit) {\n webpackConfig.resolve?.modules?.push(resolvedBaseUrl.baseUrl)\n }\n\n // always add JsConfigPathsPlugin to allow hot-reloading\n // if the config is added/removed\n webpackConfig.resolve?.plugins?.unshift(\n new JsConfigPathsPlugin(\n jsConfig?.compilerOptions?.paths || {},\n resolvedBaseUrl\n )\n )\n\n const webpack5Config = webpackConfig as webpack.Configuration\n\n if (isEdgeServer) {\n webpack5Config.module?.rules?.unshift({\n test: /\\.wasm$/,\n loader: 'next-middleware-wasm-loader',\n type: 'javascript/auto',\n resourceQuery: /module/i,\n })\n webpack5Config.module?.rules?.unshift({\n dependency: 'url',\n loader: 'next-middleware-asset-loader',\n type: 'javascript/auto',\n layer: WEBPACK_LAYERS.edgeAsset,\n })\n webpack5Config.module?.rules?.unshift({\n issuerLayer: WEBPACK_LAYERS.edgeAsset,\n type: 'asset/source',\n })\n }\n\n webpack5Config.experiments = {\n layers: true,\n cacheUnaffected: true,\n buildHttp: Array.isArray(config.experimental.urlImports)\n ? {\n allowedUris: config.experimental.urlImports,\n cacheLocation: path.join(dir, 'next.lock/data'),\n lockfileLocation: path.join(dir, 'next.lock/lock.json'),\n }\n : config.experimental.urlImports\n ? {\n cacheLocation: path.join(dir, 'next.lock/data'),\n lockfileLocation: path.join(dir, 'next.lock/lock.json'),\n ...config.experimental.urlImports,\n }\n : undefined,\n }\n\n webpack5Config.module!.parser = {\n javascript: {\n url: 'relative',\n },\n }\n webpack5Config.module!.generator = {\n asset: {\n filename: 'static/media/[name].[hash:8][ext]',\n },\n }\n\n if (!webpack5Config.output) {\n webpack5Config.output = {}\n }\n if (isClient) {\n webpack5Config.output.trustedTypes = 'nextjs#bundler'\n }\n\n if (isClient || isEdgeServer) {\n webpack5Config.output.enabledLibraryTypes = ['assign']\n }\n\n // This enables managedPaths for all node_modules\n // and also for the unplugged folder when using yarn pnp\n // It also add the yarn cache to the immutable paths\n webpack5Config.snapshot = {}\n if (process.versions.pnp === '3') {\n webpack5Config.snapshot.managedPaths = [\n /^(.+?(?:[\\\\/]\\.yarn[\\\\/]unplugged[\\\\/][^\\\\/]+)?[\\\\/]node_modules[\\\\/])/,\n ]\n } else {\n webpack5Config.snapshot.managedPaths = [/^(.+?[\\\\/]node_modules[\\\\/])/]\n }\n if (process.versions.pnp === '3') {\n webpack5Config.snapshot.immutablePaths = [\n /^(.+?[\\\\/]cache[\\\\/][^\\\\/]+\\.zip[\\\\/]node_modules[\\\\/])/,\n ]\n }\n\n if (dev) {\n if (!webpack5Config.optimization) {\n webpack5Config.optimization = {}\n }\n\n // For Server Components, it's necessary to have provided exports collected\n // to generate the correct flight manifest.\n if (!hasAppDir) {\n webpack5Config.optimization.providedExports = false\n }\n webpack5Config.optimization.usedExports = false\n }\n\n const configVars = JSON.stringify({\n optimizePackageImports: config?.experimental?.optimizePackageImports,\n crossOrigin: config.crossOrigin,\n pageExtensions: pageExtensions,\n trailingSlash: config.trailingSlash,\n buildActivityPosition:\n config.devIndicators === false\n ? undefined\n : config.devIndicators.position,\n productionBrowserSourceMaps: !!config.productionBrowserSourceMaps,\n reactStrictMode: config.reactStrictMode,\n optimizeCss: config.experimental.optimizeCss,\n nextScriptWorkers: config.experimental.nextScriptWorkers,\n scrollRestoration: config.experimental.scrollRestoration,\n typedRoutes: config.experimental.typedRoutes,\n basePath: config.basePath,\n excludeDefaultMomentLocales: config.excludeDefaultMomentLocales,\n assetPrefix: config.assetPrefix,\n disableOptimizedLoading,\n isEdgeRuntime: isEdgeServer,\n reactProductionProfiling,\n webpack: !!config.webpack,\n hasRewrites,\n swcLoader: useSWCLoader,\n removeConsole: config.compiler?.removeConsole,\n reactRemoveProperties: config.compiler?.reactRemoveProperties,\n styledComponents: config.compiler?.styledComponents,\n relay: config.compiler?.relay,\n emotion: config.compiler?.emotion,\n modularizeImports: config.modularizeImports,\n imageLoaderFile: config.images.loaderFile,\n clientTraceMetadata: config.experimental.clientTraceMetadata,\n serverSourceMaps: config.experimental.serverSourceMaps,\n serverReferenceHashSalt: encryptionKey,\n })\n\n const cache: any = {\n type: 'filesystem',\n // Disable memory cache in development in favor of our own MemoryWithGcCachePlugin.\n maxMemoryGenerations: dev ? 0 : Infinity, // Infinity is default value for production in webpack currently.\n // Includes:\n // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)\n // - Next.js version\n // - next.config.js keys that affect compilation\n version: `${__dirname}|${process.env.__NEXT_VERSION}|${configVars}`,\n cacheDirectory: path.join(distDir, 'cache', 'webpack'),\n // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.\n // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.\n // For local development, we still want to compress the cache files individually to avoid I/O bottlenecks\n // as we are seeing 1~10 seconds of fs I/O time from user reports.\n compression: dev ? 'gzip' : false,\n }\n\n // Adds `next.config.js` as a buildDependency when custom webpack config is provided\n if (config.webpack && config.configFile) {\n cache.buildDependencies = {\n config: [config.configFile],\n // We don't want to use the webpack default buildDependencies as we already include the next.js version\n defaultWebpack: [],\n }\n } else {\n cache.buildDependencies = {\n // We don't want to use the webpack default buildDependencies as we already include the next.js version\n defaultWebpack: [],\n }\n }\n webpack5Config.plugins?.push((compiler) => {\n compiler.hooks.done.tap('next-build-dependencies', (stats) => {\n const buildDependencies = stats.compilation.buildDependencies\n const nextPackage = path.dirname(require.resolve('next/package.json'))\n // Remove all next.js build dependencies, they are already covered by the cacheVersion\n // and next.js also imports the output files which leads to broken caching.\n for (const dep of buildDependencies) {\n if (dep.startsWith(nextPackage)) {\n buildDependencies.delete(dep)\n }\n }\n })\n })\n\n webpack5Config.cache = cache\n\n if (process.env.NEXT_WEBPACK_LOGGING) {\n const infra = process.env.NEXT_WEBPACK_LOGGING.includes('infrastructure')\n const profileClient =\n process.env.NEXT_WEBPACK_LOGGING.includes('profile-client')\n const profileServer =\n process.env.NEXT_WEBPACK_LOGGING.includes('profile-server')\n const summaryClient =\n process.env.NEXT_WEBPACK_LOGGING.includes('summary-client')\n const summaryServer =\n process.env.NEXT_WEBPACK_LOGGING.includes('summary-server')\n\n const profile =\n (profileClient && isClient) || (profileServer && isNodeOrEdgeCompilation)\n const summary =\n (summaryClient && isClient) || (summaryServer && isNodeOrEdgeCompilation)\n\n const logDefault = !infra && !profile && !summary\n\n if (logDefault || infra) {\n webpack5Config.infrastructureLogging = {\n level: 'verbose',\n debug: /FileSystemInfo/,\n }\n }\n\n if (logDefault || profile) {\n webpack5Config.plugins!.push((compiler: webpack.Compiler) => {\n compiler.hooks.done.tap('next-webpack-logging', (stats) => {\n console.log(\n stats.toString({\n colors: true,\n logging: logDefault ? 'log' : 'verbose',\n })\n )\n })\n })\n } else if (summary) {\n webpack5Config.plugins!.push((compiler: webpack.Compiler) => {\n compiler.hooks.done.tap('next-webpack-logging', (stats) => {\n console.log(\n stats.toString({\n preset: 'summary',\n colors: true,\n timings: true,\n })\n )\n })\n })\n }\n\n if (profile) {\n const ProgressPlugin =\n webpack.ProgressPlugin as unknown as typeof webpack.ProgressPlugin\n webpack5Config.plugins!.push(\n new ProgressPlugin({\n profile: true,\n })\n )\n webpack5Config.profile = true\n }\n }\n\n webpackConfig = await buildConfiguration(webpackConfig, {\n supportedBrowsers,\n rootDirectory: dir,\n customAppFile: pagesDir\n ? new RegExp(escapeStringRegexp(path.join(pagesDir, `_app`)))\n : undefined,\n hasAppDir,\n isDevelopment: dev,\n isServer: isNodeOrEdgeCompilation,\n isEdgeRuntime: isEdgeServer,\n targetWeb: isClient || isEdgeServer,\n assetPrefix: config.assetPrefix || '',\n sassOptions: config.sassOptions,\n productionBrowserSourceMaps: config.productionBrowserSourceMaps,\n future: config.future,\n experimental: config.experimental,\n disableStaticImages: config.images.disableStaticImages,\n transpilePackages: config.transpilePackages,\n serverSourceMaps: config.experimental.serverSourceMaps,\n })\n\n // @ts-ignore Cache exists\n webpackConfig.cache.name = `${webpackConfig.name}-${webpackConfig.mode}${\n isDevFallback ? '-fallback' : ''\n }`\n\n if (dev) {\n if (webpackConfig.module) {\n webpackConfig.module.unsafeCache = (module: any) =>\n !UNSAFE_CACHE_REGEX.test(module.resource)\n } else {\n webpackConfig.module = {\n unsafeCache: (module: any) => !UNSAFE_CACHE_REGEX.test(module.resource),\n }\n }\n }\n\n let originalDevtool = webpackConfig.devtool\n if (typeof config.webpack === 'function') {\n const pluginCountBefore = webpackConfig.plugins?.length\n\n webpackConfig = config.webpack(webpackConfig, {\n dir,\n dev,\n isServer: isNodeOrEdgeCompilation,\n buildId,\n config,\n defaultLoaders,\n totalPages: Object.keys(entrypoints).length,\n webpack: bundler,\n ...(isNodeOrEdgeCompilation\n ? {\n nextRuntime: isEdgeServer ? 'edge' : 'nodejs',\n }\n : {}),\n })\n\n if (telemetryPlugin && pluginCountBefore) {\n const pluginCountAfter = webpackConfig.plugins?.length\n if (pluginCountAfter) {\n const pluginsChanged = pluginCountAfter !== pluginCountBefore\n telemetryPlugin.addUsage('webpackPlugins', pluginsChanged ? 1 : 0)\n }\n }\n\n if (!webpackConfig) {\n throw new Error(\n `Webpack config is undefined. You may have forgot to return properly from within the \"webpack\" method of your ${config.configFileName}.\\n` +\n 'See more info here https://nextjs.org/docs/messages/undefined-webpack-config'\n )\n }\n\n if (dev && originalDevtool !== webpackConfig.devtool) {\n webpackConfig.devtool = originalDevtool\n devtoolRevertWarning(originalDevtool)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const webpack5Config = webpackConfig as webpack.Configuration\n\n // disable lazy compilation of entries as next.js has it's own method here\n if (webpack5Config.experiments?.lazyCompilation === true) {\n webpack5Config.experiments.lazyCompilation = {\n entries: false,\n }\n } else if (\n typeof webpack5Config.experiments?.lazyCompilation === 'object' &&\n webpack5Config.experiments.lazyCompilation.entries !== false\n ) {\n webpack5Config.experiments.lazyCompilation.entries = false\n }\n\n if (typeof (webpackConfig as any).then === 'function') {\n console.warn(\n '> Promise returned in next config. https://nextjs.org/docs/messages/promise-in-next-config'\n )\n }\n }\n const rules = webpackConfig.module?.rules || []\n\n const customSvgRule = rules.find(\n (rule): rule is webpack.RuleSetRule =>\n (rule &&\n typeof rule === 'object' &&\n rule.loader !== 'next-image-loader' &&\n 'test' in rule &&\n rule.test instanceof RegExp &&\n rule.test.test('.svg')) ||\n false\n )\n\n if (customSvgRule && hasAppDir) {\n // Create React aliases for SVG components that were transformed using a\n // custom webpack config with e.g. the `@svgr/webpack` loader, or the\n // `babel-plugin-inline-react-svg` plugin.\n rules.push({\n test: customSvgRule.test,\n oneOf: [\n WEBPACK_LAYERS.reactServerComponents,\n WEBPACK_LAYERS.serverSideRendering,\n WEBPACK_LAYERS.appPagesBrowser,\n ].map((layer) => ({\n issuerLayer: layer,\n resolve: {\n alias: createVendoredReactAliases(bundledReactChannel, {\n reactProductionProfiling,\n layer,\n isBrowser: isClient,\n isEdgeServer,\n }),\n },\n })),\n })\n }\n\n if (!config.images.disableStaticImages) {\n const nextImageRule = rules.find(\n (rule) =>\n rule && typeof rule === 'object' && rule.loader === 'next-image-loader'\n )\n if (customSvgRule && nextImageRule && typeof nextImageRule === 'object') {\n // Exclude svg if the user already defined it in custom\n // webpack config such as the `@svgr/webpack` loader, or\n // the `babel-plugin-inline-react-svg` plugin.\n nextImageRule.test = /\\.(png|jpg|jpeg|gif|webp|avif|ico|bmp)$/i\n }\n }\n\n if (\n config.experimental.craCompat &&\n webpackConfig.module?.rules &&\n webpackConfig.plugins\n ) {\n // CRA allows importing non-webpack handled files with file-loader\n // these need to be the last rule to prevent catching other items\n // https://github.com/facebook/create-react-app/blob/fddce8a9e21bf68f37054586deb0c8636a45f50b/packages/react-scripts/config/webpack.config.js#L594\n const fileLoaderExclude = [/\\.(js|mjs|jsx|ts|tsx|json)$/]\n const fileLoader = {\n exclude: fileLoaderExclude,\n issuer: fileLoaderExclude,\n type: 'asset/resource',\n }\n\n const topRules = []\n const innerRules = []\n\n for (const rule of webpackConfig.module.rules) {\n if (!rule || typeof rule !== 'object') continue\n if (rule.resolve) {\n topRules.push(rule)\n } else {\n if (\n rule.oneOf &&\n !(rule.test || rule.exclude || rule.resource || rule.issuer)\n ) {\n rule.oneOf.forEach((r) => innerRules.push(r))\n } else {\n innerRules.push(rule)\n }\n }\n }\n\n webpackConfig.module.rules = [\n ...(topRules as any),\n {\n oneOf: [...innerRules, fileLoader],\n },\n ]\n }\n\n // Backwards compat with webpack-dev-middleware options object\n if (typeof config.webpackDevMiddleware === 'function') {\n const options = config.webpackDevMiddleware({\n watchOptions: webpackConfig.watchOptions,\n })\n if (options.watchOptions) {\n webpackConfig.watchOptions = options.watchOptions\n }\n }\n\n function canMatchCss(rule: webpack.RuleSetCondition | undefined): boolean {\n if (!rule) {\n return false\n }\n\n const fileNames = [\n '/tmp/NEXTJS_CSS_DETECTION_FILE.css',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.scss',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.sass',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.less',\n '/tmp/NEXTJS_CSS_DETECTION_FILE.styl',\n ]\n\n if (rule instanceof RegExp && fileNames.some((input) => rule.test(input))) {\n return true\n }\n\n if (typeof rule === 'function') {\n if (\n fileNames.some((input) => {\n try {\n if (rule(input)) {\n return true\n }\n } catch {}\n return false\n })\n ) {\n return true\n }\n }\n\n if (Array.isArray(rule) && rule.some(canMatchCss)) {\n return true\n }\n\n return false\n }\n\n const hasUserCssConfig =\n webpackConfig.module?.rules?.some(\n (rule: any) => canMatchCss(rule.test) || canMatchCss(rule.include)\n ) ?? false\n\n if (hasUserCssConfig) {\n // only show warning for one build\n if (isNodeOrEdgeCompilation) {\n console.warn(\n yellow(bold('Warning: ')) +\n bold(\n 'Built-in CSS support is being disabled due to custom CSS configuration being detected.\\n'\n ) +\n 'See here for more info: https://nextjs.org/docs/messages/built-in-css-disabled\\n'\n )\n }\n\n if (webpackConfig.module?.rules?.length) {\n // Remove default CSS Loaders\n webpackConfig.module.rules.forEach((r) => {\n if (!r || typeof r !== 'object') return\n if (Array.isArray(r.oneOf)) {\n r.oneOf = r.oneOf.filter(\n (o) => (o as any)[Symbol.for('__next_css_remove')] !== true\n )\n }\n })\n }\n if (webpackConfig.plugins?.length) {\n // Disable CSS Extraction Plugin\n webpackConfig.plugins = webpackConfig.plugins.filter(\n (p) => (p as any).__next_css_remove !== true\n )\n }\n if (webpackConfig.optimization?.minimizer?.length) {\n // Disable CSS Minifier\n webpackConfig.optimization.minimizer =\n webpackConfig.optimization.minimizer.filter(\n (e) => (e as any).__next_css_remove !== true\n )\n }\n }\n\n // Inject missing React Refresh loaders so that development mode is fast:\n if (dev && isClient) {\n attachReactRefresh(webpackConfig, defaultLoaders.babel)\n }\n\n // Backwards compat for `main.js` entry key\n // and setup of dependencies between entries\n // we can't do that in the initial entry for\n // backward-compat reasons\n const originalEntry: any = webpackConfig.entry\n if (typeof originalEntry !== 'undefined') {\n const updatedEntry = async () => {\n const entry: webpack.EntryObject =\n typeof originalEntry === 'function'\n ? await originalEntry()\n : originalEntry\n // Server compilation doesn't have main.js\n if (\n clientEntries &&\n Array.isArray(entry['main.js']) &&\n entry['main.js'].length > 0\n ) {\n const originalFile = clientEntries[\n CLIENT_STATIC_FILES_RUNTIME_MAIN\n ] as string\n entry[CLIENT_STATIC_FILES_RUNTIME_MAIN] = [\n ...entry['main.js'],\n originalFile,\n ]\n }\n delete entry['main.js']\n\n for (const name of Object.keys(entry)) {\n entry[name] = finalizeEntrypoint({\n value: entry[name],\n compilerType,\n name,\n hasAppDir,\n })\n }\n\n return entry\n }\n // @ts-ignore webpack 5 typings needed\n webpackConfig.entry = updatedEntry\n }\n\n if (!dev && typeof webpackConfig.entry === 'function') {\n // entry is always a function\n webpackConfig.entry = await webpackConfig.entry()\n }\n\n return webpackConfig\n}\n\nfunction getNextRootParamsRules({\n isRootParamsEnabled,\n isClient,\n appDir,\n pageExtensions,\n}: {\n isRootParamsEnabled: boolean\n isClient: boolean\n appDir: string | undefined\n pageExtensions: string[]\n}): webpack.RuleSetRule[] {\n // Match resolved import of 'next/root-params'\n const nextRootParamsModule = path.join(NEXT_PROJECT_ROOT, 'root-params.js')\n\n const createInvalidImportRule = (message: string) => {\n return {\n resource: nextRootParamsModule,\n loader: 'next-invalid-import-error-loader',\n options: {\n message,\n } satisfies InvalidImportLoaderOpts,\n } satisfies webpack.RuleSetRule\n }\n\n // Hard-error if the flag is not enabled, regardless of if we're on the server or on the client.\n if (!isRootParamsEnabled) {\n return [\n createInvalidImportRule(\n \"'next/root-params' can only be imported when `experimental.rootParams` is enabled.\"\n ),\n ]\n }\n\n // If there's no app-dir (and thus no layouts), there's no sensible way to use 'next/root-params',\n // because we wouldn't generate any getters.\n if (!appDir) {\n return [\n createInvalidImportRule(\n \"'next/root-params' can only be used with the App Directory.\"\n ),\n ]\n }\n\n // In general, the compiler should prevent importing 'next/root-params' from client modules, but it doesn't catch everything.\n // If an import slips through our validation, make it error.\n const invalidClientImportRule = createInvalidImportRule(\n \"'next/root-params' cannot be imported from a Client Component module. It should only be used from a Server Component.\"\n )\n\n // in the browser compilation we can skip the server rules, because we know all imports will be invalid.\n if (isClient) {\n return [invalidClientImportRule]\n }\n\n return [\n {\n oneOf: [\n {\n resource: nextRootParamsModule,\n issuerLayer: shouldUseReactServerCondition as (\n layer: string\n ) => boolean,\n loader: 'next-root-params-loader',\n options: {\n appDir,\n pageExtensions,\n } satisfies RootParamsLoaderOpts,\n },\n // if the rule above didn't match, we're in the SSR layer (or something else that isn't server-only).\n invalidClientImportRule,\n ],\n },\n ]\n}\n"],"names":["NODE_BASE_ESM_RESOLVE_OPTIONS","NODE_BASE_RESOLVE_OPTIONS","NODE_ESM_RESOLVE_OPTIONS","NODE_RESOLVE_OPTIONS","attachReactRefresh","babelIncludeRegexes","getBaseWebpackConfig","getCacheDirectories","hasExternalOtelApiPackage","loadProjectInfo","nextImageLoaderRegex","EXTERNAL_PACKAGES","require","DEFAULT_TRANSPILED_PACKAGES","parseInt","React","version","Error","browserNonTranspileModules","precompileRegex","asyncStoragesRegex","nodePathList","process","env","NODE_PATH","split","platform","filter","p","baseWatchOptions","Object","freeze","aggregateTimeout","ignored","isModuleCSS","module","type","devtoolRevertWarning","execOnce","devtool","console","warn","yellow","bold","loggedSwcDisabled","loggedIgnoredCompilerOptions","reactRefreshLoaderName","getReactRefreshLoader","NEXT_RSPACK","getRspackReactRefresh","loader","resolve","webpackConfig","targetLoader","reactRefreshLoader","rules","forEach","rule","curr","use","Array","isArray","some","r","idx","findIndex","splice","dependencyType","modules","fallback","exportsFields","importsFields","conditionNames","descriptionFiles","extensions","enforceExtensions","symlinks","mainFields","mainFiles","roots","fullySpecified","preferRelative","preferAbsolute","restrictions","alias","dir","config","dev","jsConfig","jsConfigPath","resolvedBaseUrl","loadJsConfig","supportedBrowsers","getSupportedBrowsers","UNSAFE_CACHE_REGEX","configs","Set","map","cfg","cache","cacheDirectory","buildId","encryptionKey","compilerType","entrypoints","isDevFallback","pagesDir","reactProductionProfiling","rewrites","originalRewrites","originalRedirects","runWebpackSpan","appDir","middlewareMatchers","noMangling","clientRouterFilters","fetchCacheKeyPrefix","isCompileMode","previewProps","webpack5Config","bundler","getWebpackBundler","isClient","COMPILER_NAMES","client","isEdgeServer","edgeServer","isNodeServer","server","isRspack","Boolean","FlightClientEntryPlugin","BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN","RspackFlightClientEntryPlugin","NextFlightClientEntryPlugin","isNodeOrEdgeCompilation","hasRewrites","beforeFiles","length","afterFiles","hasAppDir","disableOptimizedLoading","enableTypedRoutes","experimental","typedRoutes","bundledReactChannel","needsExperimentalReact","babelConfigFile","getBabelConfigFile","hasCustomExportOutput","distDir","path","join","useSWCLoader","forceSwcTransforms","SWCBinaryTarget","undefined","binaryTarget","getBinaryMetadata","target","Log","info","relative","loadBindings","useWasmBinary","finalTranspilePackages","transpilePackages","concat","pkg","optimizePackageImports","includes","push","compiler","excludeCache","exclude","excludePath","cached","shouldExclude","test","isResourceInPackages","shouldIncludeExternalDirs","externalDir","codeCondition","or","include","babelLoader","getBabelLoader","reactCompiler","reactCompilerLoader","getReactCompilerLoader","swcTraceProfilingInitialized","getSwcLoader","extraOptions","swcTraceProfiling","initCustomTraceSubscriber","Date","now","useBuiltinSwcLoader","BUILTIN_SWC_LOADER","options","isServer","rootDir","hasReactRefresh","swcCacheDir","serverReferenceHashSalt","pnp","versions","optimizeServerReact","modularizeImports","decorators","compilerOptions","experimentalDecorators","emitDecoratorMetadata","regeneratorRuntimePath","nextConfig","swcServerLayerLoader","serverComponents","bundleLayer","WEBPACK_LAYERS","reactServerComponents","esm","swcSSRLayerLoader","serverSideRendering","swcBrowserLayerLoader","appPagesBrowser","swcDefaultLoader","defaultLoaders","babel","appServerLayerLoaders","instrumentLayerLoaders","middlewareLayerLoaders","middleware","reactRefreshLoaders","createClientLayerLoader","isBrowserLayer","reactRefresh","appBrowserLayerLoaders","appSSRLayerLoaders","apiRoutesLayerLoaders","apiNode","pageExtensions","outputPath","SERVER_DIRECTORY","reactServerCondition","edgeConditionNames","reactRefreshEntry","entry","clientEntries","CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH","CLIENT_STATIC_FILES_RUNTIME_AMP","NEXT_PROJECT_ROOT_DIST_CLIENT","replace","CLIENT_STATIC_FILES_RUNTIME_MAIN","CLIENT_STATIC_FILES_RUNTIME_MAIN_APP","resolveConfig","extensionAlias","createWebpackAliases","getMainField","plugins","OptionalPeerDependencyResolverPlugin","tsConfig","configFile","nextFrameworkPaths","topLevelFrameworkPaths","visitedFrameworkPackages","addPackagePath","packageName","relativeToPath","paths","has","add","packageJsonPath","directory","dependencies","name","keys","_","crossOrigin","serverExternalPackages","externalPackageConflicts","optOutBundlingPackages","optOutBundlingPackageRegex","RegExp","transpilePackagesRegex","handleExternals","makeExternalHandler","transpiledPackages","pageExtensionsRegex","aliasCodeConditionTest","builtinModules","bunExternals","shouldEnableSlowModuleDetection","slowModuleDetection","getParallelism","override","Number","NEXT_WEBPACK_PARALLELISM","telemetryPlugin","TelemetryPlugin","Map","relay","styledComponents","reactRemoveProperties","removeConsole","jsxImportSource","emotion","skipMiddlewareUrlNormalize","skipTrailingSlashRedirect","esmExternals","parallelism","externalsPresets","node","externals","getEdgePolyfilledModules","handleWebpackExternalForEdgeRuntime","context","request","contextInfo","getResolve","issuerLayer","resolveFunction","resolveContext","requestToResolve","Promise","reject","err","result","resolveData","isEsm","descriptionFileData","optimization","emitOnErrors","checkWasmTypes","nodeEnv","splitChunks","extractRootNodeModule","modulePath","regex","match","cacheGroups","vendor","chunks","reuseExistingChunk","minSize","minChunks","maxAsyncRequests","maxInitialRequests","moduleId","nameForCondition","rootModule","hash","crypto","createHash","update","digest","default","defaultVendors","filename","frameworkCacheGroup","layer","isWebpackDefaultLayer","resource","pkgPath","startsWith","priority","enforce","libCacheGroup","size","updateHash","libIdent","substring","chunk","framework","RSPACK_DEFAULT_LAYERS_REGEX","lib","runtimeChunk","CLIENT_STATIC_FILES_RUNTIME_WEBPACK","minimize","serverMinification","minimizer","getRspackCore","SwcJsMinimizerRspackPlugin","minimizerOptions","compress","inline","global_defs","mangle","reserved","disableCharFreq","MinifyPlugin","apply","__NEXT_TEST_MODE","useLightningcss","LightningCssMinimizerRspackPlugin","targets","CssMinimizerPlugin","postcssOptions","annotation","watchOptions","poll","pollIntervalMs","output","publicPath","assetPrefix","endsWith","slice","library","libraryTarget","hotUpdateChunkFilename","hotUpdateMainFilename","chunkFilename","strictModuleExceptionHandling","crossOriginLoading","devtoolModuleFilenameTemplate","webassemblyModuleFilename","hashFunction","hashDigestLength","performance","resolveLoader","reduce","__dirname","GROUP","serverOnly","neutralTarget","createServerOnlyClientOnlyAliases","not","message","shared","resourceQuery","WEBPACK_RESOURCE_QUERIES","metadataRoute","isWebpackBundledLayer","createNextApiEsmAliases","shouldUseReactServerCondition","createAppRouterApiAliases","isWebpackClientOnlyLayer","and","metadata","metadataImageMeta","createVendoredReactAliases","isBrowser","getNextRootParamsRules","isRootParamsEnabled","rootParams","cacheComponents","edgeSSREntry","oneOf","parser","url","apiEdge","instrument","images","disableStaticImages","issuer","regexLikeCss","dependency","isDev","basePath","fallbackNodePolyfills","assert","buffer","constants","domain","http","https","os","punycode","querystring","stream","string_decoder","sys","timers","tty","util","vm","zlib","events","setImmediate","sideEffects","names","ident","next","NEXT_PROJECT_ROOT","NormalModuleReplacementPlugin","moduleName","basename","runtime","actionBrowser","MemoryWithGcCachePlugin","maxGenerations","injectLoader","injectEntry","overlay","ReactRefreshWebpackPlugin","webpack","ProvidePlugin","Buffer","DefinePlugin","getDefineEnv","isTurbopack","projectPath","omitNonDeterministic","ReactLoadablePlugin","REACT_LOADABLE_MANIFEST","runtimeAsset","MIDDLEWARE_REACT_LOADABLE_MANIFEST","DropClientPage","TraceEntryPointsPlugin","outputFileTracingRoot","appDirEnabled","traceIgnores","excludeDefaultMomentLocales","IgnorePlugin","resourceRegExp","contextRegExp","NextJsRequireCacheHotReloader","devPlugins","HotModuleReplacementPlugin","PagesManifestPlugin","isEdgeRuntime","MiddlewarePlugin","sriEnabled","sri","algorithm","edgeEnvironments","__NEXT_BUILD_ID","NEXT_SERVER_ACTIONS_ENCRYPTION_KEY","__NEXT_PREVIEW_MODE_ID","previewModeId","__NEXT_PREVIEW_MODE_SIGNING_KEY","previewModeSigningKey","__NEXT_PREVIEW_MODE_ENCRYPTION_KEY","previewModeEncryptionKey","BuildManifestPlugin","RspackProfilingPlugin","ProfilingPlugin","WellKnownErrorsPlugin","CopyFilePlugin","filePath","cacheKey","__NEXT_VERSION","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL","minimized","AppBuildManifestPlugin","ClientReferenceManifestPlugin","experimentalInlineCss","inlineCss","NextTypesPlugin","cacheLifeConfig","cacheLife","SubresourceIntegrityPlugin","NextFontManifestPlugin","cssChunking","experiments","CssChunkingPlugin","strict","nextjs","isImplicit","baseUrl","unshift","JsConfigPathsPlugin","edgeAsset","layers","cacheUnaffected","buildHttp","urlImports","allowedUris","cacheLocation","lockfileLocation","javascript","generator","asset","trustedTypes","enabledLibraryTypes","snapshot","managedPaths","immutablePaths","providedExports","usedExports","configVars","JSON","stringify","trailingSlash","buildActivityPosition","devIndicators","position","productionBrowserSourceMaps","reactStrictMode","optimizeCss","nextScriptWorkers","scrollRestoration","swcLoader","imageLoaderFile","loaderFile","clientTraceMetadata","serverSourceMaps","maxMemoryGenerations","Infinity","compression","buildDependencies","defaultWebpack","hooks","done","tap","stats","compilation","nextPackage","dirname","dep","delete","NEXT_WEBPACK_LOGGING","infra","profileClient","profileServer","summaryClient","summaryServer","profile","summary","logDefault","infrastructureLogging","level","debug","log","toString","colors","logging","preset","timings","ProgressPlugin","buildConfiguration","rootDirectory","customAppFile","escapeStringRegexp","isDevelopment","targetWeb","sassOptions","future","mode","unsafeCache","originalDevtool","pluginCountBefore","totalPages","nextRuntime","pluginCountAfter","pluginsChanged","addUsage","configFileName","lazyCompilation","entries","then","customSvgRule","find","nextImageRule","craCompat","fileLoaderExclude","fileLoader","topRules","innerRules","webpackDevMiddleware","canMatchCss","fileNames","input","hasUserCssConfig","o","Symbol","for","__next_css_remove","e","originalEntry","updatedEntry","originalFile","finalizeEntrypoint","value","nextRootParamsModule","createInvalidImportRule","invalidClientImportRule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAuPaA,6BAA6B;eAA7BA;;IAbAC,yBAAyB;eAAzBA;;IAKAC,wBAAwB;eAAxBA;;IAzBAC,oBAAoB;eAApBA;;IA9BGC,kBAAkB;eAAlBA;;IAlEHC,mBAAmB;eAAnBA;;IA8Lb,OAu6EC;eAv6E6BC;;IAfdC,mBAAmB;eAAnBA;;IAXAC,yBAAyB;eAAzBA;;IA3BMC,eAAe;eAAfA;;IAHTC,oBAAoB;eAApBA;;;8DA5PK;kFACoB;4BACT;+DACV;yBACK;6DACP;2BAEY;8BACM;2BACsB;uBAQlD;4BAaA;wBAEkB;yBAEU;6DACd;wBACc;0EAI5B;4EACyB;qCACI;0CACL;4EACC;iCACA;qCACI;uCACE;qBACT;gCACE;sCACe;yCACyB;+CACzB;iCACd;qEAUzB;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