@openuiai/next 15.6.0-bun.2 → 15.6.0-bun.4

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 (51) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +3 -3
  3. package/dist/build/swc/index.js +3 -3
  4. package/dist/build/swc/index.js.map +1 -1
  5. package/dist/build/swc/options.js +1 -1
  6. package/dist/build/swc/options.js.map +1 -1
  7. package/dist/build/webpack-config.js +3 -3
  8. package/dist/build/webpack-config.js.map +1 -1
  9. package/dist/cli/next-info.js +1 -1
  10. package/dist/cli/next-info.js.map +1 -1
  11. package/dist/client/app-bootstrap.js +1 -1
  12. package/dist/client/index.js +1 -1
  13. package/dist/compiled/@next/font/dist/google/get-fallback-font-override-metrics.js +2 -2
  14. package/dist/compiled/@next/font/dist/google/get-proxy-agent.js +2 -2
  15. package/dist/compiled/@next/font/dist/google/loader.js +1 -1
  16. package/dist/compiled/@next/font/dist/google/retry.js +1 -1
  17. package/dist/compiled/@next/font/google/index.js +2 -2
  18. package/dist/compiled/@next/font/local/index.js +2 -2
  19. package/dist/esm/build/index.js +3 -3
  20. package/dist/esm/build/swc/index.js +3 -3
  21. package/dist/esm/build/swc/index.js.map +1 -1
  22. package/dist/esm/build/swc/options.js +1 -1
  23. package/dist/esm/build/swc/options.js.map +1 -1
  24. package/dist/esm/build/webpack-config.js +3 -3
  25. package/dist/esm/build/webpack-config.js.map +1 -1
  26. package/dist/esm/client/app-bootstrap.js +1 -1
  27. package/dist/esm/client/index.js +1 -1
  28. package/dist/esm/lib/patch-incorrect-lockfile.js +1 -1
  29. package/dist/esm/lib/patch-incorrect-lockfile.js.map +1 -1
  30. package/dist/esm/server/dev/hot-reloader-shared-utils.js +1 -1
  31. package/dist/esm/server/dev/hot-reloader-shared-utils.js.map +1 -1
  32. package/dist/esm/server/dev/hot-reloader-webpack.js +2 -2
  33. package/dist/esm/server/dev/hot-reloader-webpack.js.map +1 -1
  34. package/dist/esm/server/lib/app-info-log.js +1 -1
  35. package/dist/esm/server/lib/start-server.js +1 -1
  36. package/dist/esm/shared/lib/canary-only.js +1 -1
  37. package/dist/lib/patch-incorrect-lockfile.js +1 -1
  38. package/dist/lib/patch-incorrect-lockfile.js.map +1 -1
  39. package/dist/server/dev/hot-reloader-shared-utils.js +1 -1
  40. package/dist/server/dev/hot-reloader-shared-utils.js.map +1 -1
  41. package/dist/server/dev/hot-reloader-webpack.js +2 -2
  42. package/dist/server/dev/hot-reloader-webpack.js.map +1 -1
  43. package/dist/server/lib/app-info-log.js +1 -1
  44. package/dist/server/lib/start-server.js +1 -1
  45. package/dist/shared/lib/canary-only.js +1 -1
  46. package/dist/telemetry/anonymous-meta.js +1 -1
  47. package/dist/telemetry/events/session-stopped.js +2 -2
  48. package/dist/telemetry/events/swc-load-failure.js +1 -1
  49. package/dist/telemetry/events/swc-load-failure.js.map +1 -1
  50. package/dist/telemetry/events/version.js +2 -2
  51. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/build/swc/options.ts"],"sourcesContent":["import path from 'path'\nimport { WEBPACK_LAYERS, type WebpackLayerName } from '../../lib/constants'\nimport type {\n NextConfig,\n ExperimentalConfig,\n EmotionConfig,\n StyledComponentsConfig,\n} from '../../server/config-shared'\nimport type { ResolvedBaseUrl } from '../load-jsconfig'\nimport { shouldUseReactServerCondition, isWebpackAppPagesLayer } from '../utils'\nimport { escapeStringRegexp } from '../../shared/lib/escape-regexp'\n\nconst nextDirname = path.dirname(require.resolve('next/package.json'))\n\nconst nextDistPath = new RegExp(\n `${escapeStringRegexp(nextDirname)}[\\\\/]dist[\\\\/](shared[\\\\/]lib|client|pages)`\n)\n\nconst nodeModulesPath = /[\\\\/]node_modules[\\\\/]/\n\nconst regeneratorRuntimePath = require.resolve(\n 'next/dist/compiled/regenerator-runtime'\n)\n\nfunction isTypeScriptFile(filename: string) {\n return filename.endsWith('.ts') || filename.endsWith('.tsx')\n}\n\nfunction isCommonJSFile(filename: string) {\n return filename.endsWith('.cjs')\n}\n\n// Ensure Next.js internals and .cjs files are output as CJS modules,\n// By default all modules are output as ESM or will treated as CJS if next-swc/auto-cjs plugin detects file is CJS.\nfunction shouldOutputCommonJs(filename: string) {\n return isCommonJSFile(filename) || nextDistPath.test(filename)\n}\n\nexport function getParserOptions({ filename, jsConfig, ...rest }: any) {\n const isTSFile = filename.endsWith('.ts')\n const hasTsSyntax = isTypeScriptFile(filename)\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n return {\n ...rest,\n syntax: hasTsSyntax ? 'typescript' : 'ecmascript',\n dynamicImport: true,\n decorators: enableDecorators,\n // Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags.\n [hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile,\n importAssertions: true,\n }\n}\n\nfunction getBaseSWCOptions({\n filename,\n jest,\n development,\n hasReactRefresh,\n globalWindow,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n resolvedBaseUrl,\n jsConfig,\n supportedBrowsers,\n swcCacheDir,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n isCacheComponents,\n cacheHandlers,\n useCacheEnabled,\n trackDynamicImports,\n}: {\n filename: string\n jest?: boolean\n development: boolean\n hasReactRefresh: boolean\n globalWindow: boolean\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n compilerOptions: NextConfig['compiler']\n swcPlugins: ExperimentalConfig['swcPlugins']\n resolvedBaseUrl?: ResolvedBaseUrl\n jsConfig: any\n supportedBrowsers: string[] | undefined\n swcCacheDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n isCacheComponents?: boolean\n cacheHandlers?: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n trackDynamicImports?: boolean\n}) {\n const isReactServerLayer = shouldUseReactServerCondition(bundleLayer)\n const isAppRouterPagesLayer = isWebpackAppPagesLayer(bundleLayer)\n const parserConfig = getParserOptions({ filename, jsConfig })\n const paths = jsConfig?.compilerOptions?.paths\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n const emitDecoratorMetadata = Boolean(\n jsConfig?.compilerOptions?.emitDecoratorMetadata\n )\n const useDefineForClassFields = Boolean(\n jsConfig?.compilerOptions?.useDefineForClassFields\n )\n const plugins = (swcPlugins ?? [])\n .filter(Array.isArray)\n .map(([name, options]: any) => [require.resolve(name), options])\n\n return {\n jsc: {\n ...(resolvedBaseUrl && paths\n ? {\n baseUrl: resolvedBaseUrl.baseUrl,\n paths,\n }\n : {}),\n externalHelpers: !process.versions.pnp && !jest,\n parser: parserConfig,\n experimental: {\n keepImportAttributes: true,\n emitAssertForImportAttributes: true,\n plugins,\n cacheRoot: swcCacheDir,\n },\n transform: {\n // Enables https://github.com/swc-project/swc/blob/0359deb4841be743d73db4536d4a22ac797d7f65/crates/swc_ecma_ext_transforms/src/jest.rs\n ...(jest\n ? {\n hidden: {\n jest: true,\n },\n }\n : {}),\n legacyDecorator: enableDecorators,\n decoratorMetadata: emitDecoratorMetadata,\n useDefineForClassFields: useDefineForClassFields,\n react: {\n importSource:\n jsConfig?.compilerOptions?.jsxImportSource ??\n (compilerOptions?.emotion && !isReactServerLayer\n ? '@emotion/react'\n : 'react'),\n runtime: 'automatic',\n pragmaFrag: 'React.Fragment',\n throwIfNamespace: true,\n development: !!development,\n useBuiltins: true,\n refresh: !!hasReactRefresh,\n },\n optimizer: {\n simplify: false,\n globals: jest\n ? null\n : {\n typeofs: {\n window: globalWindow ? 'object' : 'undefined',\n },\n envs: {\n NODE_ENV: development ? '\"development\"' : '\"production\"',\n },\n // TODO: handle process.browser to match babel replacing as well\n },\n },\n regenerator: {\n importPath: regeneratorRuntimePath,\n },\n },\n },\n sourceMaps: jest ? 'inline' : undefined,\n removeConsole: compilerOptions?.removeConsole,\n // disable \"reactRemoveProperties\" when \"jest\" is true\n // otherwise the setting from next.config.js will be used\n reactRemoveProperties: jest\n ? false\n : compilerOptions?.reactRemoveProperties,\n // Map the k-v map to an array of pairs.\n modularizeImports: modularizeImports\n ? Object.fromEntries(\n Object.entries(modularizeImports).map(([mod, config]) => [\n mod,\n {\n ...config,\n transform:\n typeof config.transform === 'string'\n ? config.transform\n : Object.entries(config.transform).map(([key, value]) => [\n key,\n value,\n ]),\n },\n ])\n )\n : undefined,\n relay: compilerOptions?.relay,\n // Always transform styled-jsx and error when `client-only` condition is triggered\n styledJsx: compilerOptions?.styledJsx ?? {\n useLightningcss: jsConfig?.experimental?.useLightningcss ?? false,\n },\n // Disable css-in-js libs (without client-only integration) transform on server layer for server components\n ...(!isReactServerLayer && {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n emotion: getEmotionOptions(compilerOptions?.emotion, development),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n styledComponents: getStyledComponentsOptions(\n compilerOptions?.styledComponents,\n development\n ),\n }),\n serverComponents:\n serverComponents && !jest\n ? {\n isReactServerLayer,\n cacheComponentsEnabled: isCacheComponents,\n useCacheEnabled,\n }\n : undefined,\n serverActions:\n isAppRouterPagesLayer && !jest\n ? {\n isReactServerLayer,\n isDevelopment: development,\n useCacheEnabled,\n hashSalt: serverReferenceHashSalt,\n cacheKinds: ['default', 'remote', 'private'].concat(\n cacheHandlers ? Object.keys(cacheHandlers) : []\n ),\n }\n : undefined,\n // For app router we prefer to bundle ESM,\n // On server side of pages router we prefer CJS.\n preferEsm: esm,\n lintCodemodComments: true,\n trackDynamicImports: trackDynamicImports,\n debugFunctionName: development,\n\n ...(supportedBrowsers && supportedBrowsers.length > 0\n ? {\n cssEnv: {\n targets: supportedBrowsers,\n },\n }\n : {}),\n }\n}\n\nfunction getStyledComponentsOptions(\n styledComponentsConfig: undefined | boolean | StyledComponentsConfig,\n development: any\n) {\n if (!styledComponentsConfig) {\n return null\n } else if (typeof styledComponentsConfig === 'object') {\n return {\n ...styledComponentsConfig,\n displayName: styledComponentsConfig.displayName ?? Boolean(development),\n }\n } else {\n return {\n displayName: Boolean(development),\n }\n }\n}\n\nfunction getEmotionOptions(\n emotionConfig: undefined | boolean | EmotionConfig,\n development: boolean\n) {\n if (!emotionConfig) {\n return null\n }\n let autoLabel = !!development\n if (typeof emotionConfig === 'object' && emotionConfig.autoLabel) {\n switch (emotionConfig.autoLabel) {\n case 'never':\n autoLabel = false\n break\n case 'always':\n autoLabel = true\n break\n case 'dev-only':\n break\n default:\n emotionConfig.autoLabel satisfies never\n }\n }\n return {\n enabled: true,\n autoLabel,\n sourcemap: development,\n ...(typeof emotionConfig === 'object' && {\n importMap: emotionConfig.importMap,\n labelFormat: emotionConfig.labelFormat,\n sourcemap: development && emotionConfig.sourceMap,\n }),\n }\n}\n\nexport function getJestSWCOptions({\n isServer,\n filename,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n pagesDir,\n serverReferenceHashSalt,\n}: {\n isServer: boolean\n filename: string\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n resolvedBaseUrl?: ResolvedBaseUrl\n pagesDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n}) {\n let baseOptions = getBaseSWCOptions({\n filename,\n jest: true,\n development: false,\n hasReactRefresh: false,\n globalWindow: !isServer,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n supportedBrowsers: undefined,\n esm,\n // Don't apply server layer transformations for Jest\n // Disable server / client graph assertions for Jest\n bundleLayer: undefined,\n serverComponents: false,\n serverReferenceHashSalt,\n })\n\n const useCjsModules = shouldOutputCommonJs(filename)\n return {\n ...baseOptions,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n module: {\n type: esm && !useCjsModules ? 'es6' : 'commonjs',\n },\n disableNextSsg: true,\n disablePageConfig: true,\n pagesDir,\n }\n}\n\nexport function getLoaderSWCOptions({\n // This is not passed yet as \"paths\" resolving is handled by webpack currently.\n // resolvedBaseUrl,\n filename,\n development,\n isServer,\n pagesDir,\n appDir,\n isPageFile,\n isCacheComponents,\n hasReactRefresh,\n modularizeImports,\n optimizeServerReact,\n optimizePackageImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n supportedBrowsers,\n swcCacheDir,\n relativeFilePathFromRoot,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n esm,\n cacheHandlers,\n useCacheEnabled,\n trackDynamicImports,\n}: {\n filename: string\n development: boolean\n isServer: boolean\n pagesDir?: string\n appDir?: string\n isPageFile: boolean\n hasReactRefresh: boolean\n optimizeServerReact?: boolean\n modularizeImports: NextConfig['modularizeImports']\n isCacheComponents?: boolean\n optimizePackageImports?: NonNullable<\n NextConfig['experimental']\n >['optimizePackageImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n supportedBrowsers: string[] | undefined\n swcCacheDir: string\n relativeFilePathFromRoot: string\n esm?: boolean\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n cacheHandlers: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n trackDynamicImports?: boolean\n}) {\n let baseOptions: any = getBaseSWCOptions({\n filename,\n development,\n globalWindow: !isServer,\n hasReactRefresh,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n // resolvedBaseUrl,\n supportedBrowsers,\n swcCacheDir,\n bundleLayer,\n serverComponents,\n serverReferenceHashSalt,\n esm: !!esm,\n isCacheComponents,\n cacheHandlers,\n useCacheEnabled,\n trackDynamicImports,\n })\n baseOptions.fontLoaders = {\n fontLoaders: ['next/font/local', 'next/font/google'],\n relativeFilePathFromRoot,\n }\n baseOptions.cjsRequireOptimizer = {\n packages: {\n 'next/server': {\n transforms: {\n NextRequest: 'next/dist/server/web/spec-extension/request',\n NextResponse: 'next/dist/server/web/spec-extension/response',\n ImageResponse: 'next/dist/server/web/spec-extension/image-response',\n userAgentFromString: 'next/dist/server/web/spec-extension/user-agent',\n userAgent: 'next/dist/server/web/spec-extension/user-agent',\n },\n },\n },\n }\n\n if (optimizeServerReact && isServer && !development) {\n baseOptions.optimizeServerReact = {\n optimize_use_state: false,\n }\n }\n\n // Modularize import optimization for barrel files\n if (optimizePackageImports) {\n baseOptions.autoModularizeImports = {\n packages: optimizePackageImports,\n }\n }\n\n const isNodeModules = nodeModulesPath.test(filename)\n const isAppBrowserLayer = bundleLayer === WEBPACK_LAYERS.appPagesBrowser\n const moduleResolutionConfig = shouldOutputCommonJs(filename)\n ? {\n module: {\n type: 'commonjs',\n },\n }\n : {}\n\n let options: any\n if (isServer) {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n // Disables getStaticProps/getServerSideProps tree shaking on the server compilation for pages\n disableNextSsg: true,\n disablePageConfig: true,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n preferEsm: !!esm,\n isPageFile,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n }\n } else {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n disableNextSsg: !isPageFile,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n isPageFile,\n ...(supportedBrowsers && supportedBrowsers.length > 0\n ? {\n env: {\n targets: supportedBrowsers,\n },\n }\n : {}),\n }\n if (!options.env) {\n // Matches default @babel/preset-env behavior\n options.jsc.target = 'es5'\n }\n }\n\n // For node_modules in app browser layer, we don't need to do any server side transformation.\n // Only keep server actions transform to discover server actions from client components.\n if (isAppBrowserLayer && isNodeModules) {\n options.disableNextSsg = true\n options.disablePageConfig = true\n options.isPageFile = false\n options.optimizeServerReact = undefined\n options.cjsRequireOptimizer = undefined\n // Disable optimizer for node_modules in app browser layer, to avoid unnecessary replacement.\n // e.g. typeof window could result differently in js worker or browser.\n if (\n options.jsc.transform.optimizer.globals?.typeofs &&\n !filename.includes(nextDirname)\n ) {\n delete options.jsc.transform.optimizer.globals.typeofs.window\n }\n }\n\n return options\n}\n"],"names":["getJestSWCOptions","getLoaderSWCOptions","getParserOptions","nextDirname","path","dirname","require","resolve","nextDistPath","RegExp","escapeStringRegexp","nodeModulesPath","regeneratorRuntimePath","isTypeScriptFile","filename","endsWith","isCommonJSFile","shouldOutputCommonJs","test","jsConfig","rest","isTSFile","hasTsSyntax","enableDecorators","Boolean","compilerOptions","experimentalDecorators","syntax","dynamicImport","decorators","importAssertions","getBaseSWCOptions","jest","development","hasReactRefresh","globalWindow","esm","modularizeImports","swcPlugins","resolvedBaseUrl","supportedBrowsers","swcCacheDir","serverComponents","serverReferenceHashSalt","bundleLayer","isCacheComponents","cacheHandlers","useCacheEnabled","trackDynamicImports","isReactServerLayer","shouldUseReactServerCondition","isAppRouterPagesLayer","isWebpackAppPagesLayer","parserConfig","paths","emitDecoratorMetadata","useDefineForClassFields","plugins","filter","Array","isArray","map","name","options","jsc","baseUrl","externalHelpers","process","versions","pnp","parser","experimental","keepImportAttributes","emitAssertForImportAttributes","cacheRoot","transform","hidden","legacyDecorator","decoratorMetadata","react","importSource","jsxImportSource","emotion","runtime","pragmaFrag","throwIfNamespace","useBuiltins","refresh","optimizer","simplify","globals","typeofs","window","envs","NODE_ENV","regenerator","importPath","sourceMaps","undefined","removeConsole","reactRemoveProperties","Object","fromEntries","entries","mod","config","key","value","relay","styledJsx","useLightningcss","getEmotionOptions","styledComponents","getStyledComponentsOptions","cacheComponentsEnabled","serverActions","isDevelopment","hashSalt","cacheKinds","concat","keys","preferEsm","lintCodemodComments","debugFunctionName","length","cssEnv","targets","styledComponentsConfig","displayName","emotionConfig","autoLabel","enabled","sourcemap","importMap","labelFormat","sourceMap","isServer","pagesDir","baseOptions","useCjsModules","env","node","module","type","disableNextSsg","disablePageConfig","appDir","isPageFile","optimizeServerReact","optimizePackageImports","relativeFilePathFromRoot","fontLoaders","cjsRequireOptimizer","packages","transforms","NextRequest","NextResponse","ImageResponse","userAgentFromString","userAgent","optimize_use_state","autoModularizeImports","isNodeModules","isAppBrowserLayer","WEBPACK_LAYERS","appPagesBrowser","moduleResolutionConfig","isServerCompiler","target","includes"],"mappings":";;;;;;;;;;;;;;;;IAgTgBA,iBAAiB;eAAjBA;;IA8DAC,mBAAmB;eAAnBA;;IAxUAC,gBAAgB;eAAhBA;;;6DAtCC;2BACqC;uBAQgB;8BACnC;;;;;;AAEnC,MAAMC,cAAcC,aAAI,CAACC,OAAO,CAACC,QAAQC,OAAO,CAAC;AAEjD,MAAMC,eAAe,IAAIC,OACvB,GAAGC,IAAAA,gCAAkB,EAACP,aAAa,2CAA2C,CAAC;AAGjF,MAAMQ,kBAAkB;AAExB,MAAMC,yBAAyBN,QAAQC,OAAO,CAC5C;AAGF,SAASM,iBAAiBC,QAAgB;IACxC,OAAOA,SAASC,QAAQ,CAAC,UAAUD,SAASC,QAAQ,CAAC;AACvD;AAEA,SAASC,eAAeF,QAAgB;IACtC,OAAOA,SAASC,QAAQ,CAAC;AAC3B;AAEA,qEAAqE;AACrE,mHAAmH;AACnH,SAASE,qBAAqBH,QAAgB;IAC5C,OAAOE,eAAeF,aAAaN,aAAaU,IAAI,CAACJ;AACvD;AAEO,SAASZ,iBAAiB,EAAEY,QAAQ,EAAEK,QAAQ,EAAE,GAAGC,MAAW;QAIjED;IAHF,MAAME,WAAWP,SAASC,QAAQ,CAAC;IACnC,MAAMO,cAAcT,iBAAiBC;IACrC,MAAMS,mBAAmBC,QACvBL,6BAAAA,4BAAAA,SAAUM,eAAe,qBAAzBN,0BAA2BO,sBAAsB;IAEnD,OAAO;QACL,GAAGN,IAAI;QACPO,QAAQL,cAAc,eAAe;QACrCM,eAAe;QACfC,YAAYN;QACZ,qKAAqK;QACrK,CAACD,cAAc,QAAQ,MAAM,EAAE,CAACD;QAChCS,kBAAkB;IACpB;AACF;AAEA,SAASC,kBAAkB,EACzBjB,QAAQ,EACRkB,IAAI,EACJ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AChBC,mBAAmB;YACnB7B,eAAenF;YACfsI,kBAAkB/B;YAClBC;YACAS;YACAzB,WAAW,CAAC,CAACrF;YACb+G;YACAP,KAAK;gBACHd,SAAS;oBACP,yCAAyC;oBACzCe,MAAM1E,QAAQC,QAAQ,CAACyE,IAAI;gBAC7B;YACF;QACF;IACF,OAAO;QACL9E,UAAU;YACR,GAAG2E,WAAW;YACd,GAAG4B,sBAAsB;YACzBtB,gBAAgB,CAACG;YACjB/B,eAAenF;YACfsI,kBAAkB/B;YAClBC;YACAS;YACAC;YACA,GAAI3G,qBAAqBA,kBAAkBoF,MAAM,GAAG,IAChD;gBACEgB,KAAK;oBACHd,SAAStF;gBACX;YACF,IACA,CAAC,CAAC;QACR;QACA,IAAI,CAACuB,QAAQ6E,GAAG,EAAE;YAChB,6CAA6C;YAC7C7E,QAAQC,GAAG,CAACwG,MAAM,GAAG;QACvB;IACF;IAEA,6FAA6F;IAC7F,wFAAwF;IACxF,IAAIL,qBAAqBD,eAAe;YASpCnG;QARFA,QAAQiF,cAAc,GAAG;QACzBjF,QAAQkF,iBAAiB,GAAG;QAC5BlF,QAAQoF,UAAU,GAAG;QACrBpF,QAAQqF,mBAAmB,GAAGlD;QAC9BnC,QAAQyF,mBAAmB,GAAGtD;QAC9B,6FAA6F;QAC7F,uEAAuE;QACvE,IACEnC,EAAAA,2CAAAA,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,qBAAvC3B,yCAAyC4B,OAAO,KAChD,CAAC7E,SAAS2J,QAAQ,CAACtK,cACnB;YACA,OAAO4D,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,CAACC,OAAO,CAACC,MAAM;QAC/D;IACF;IAEA,OAAO7B;AACT","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../src/build/swc/options.ts"],"sourcesContent":["import path from 'path'\nimport { WEBPACK_LAYERS, type WebpackLayerName } from '../../lib/constants'\nimport type {\n NextConfig,\n ExperimentalConfig,\n EmotionConfig,\n StyledComponentsConfig,\n} from '../../server/config-shared'\nimport type { ResolvedBaseUrl } from '../load-jsconfig'\nimport { shouldUseReactServerCondition, isWebpackAppPagesLayer } from '../utils'\nimport { escapeStringRegexp } from '../../shared/lib/escape-regexp'\n\nconst nextDirname = path.dirname(require.resolve('@openuiai/next/package.json'))\n\nconst nextDistPath = new RegExp(\n `${escapeStringRegexp(nextDirname)}[\\\\/]dist[\\\\/](shared[\\\\/]lib|client|pages)`\n)\n\nconst nodeModulesPath = /[\\\\/]node_modules[\\\\/]/\n\nconst regeneratorRuntimePath = require.resolve(\n 'next/dist/compiled/regenerator-runtime'\n)\n\nfunction isTypeScriptFile(filename: string) {\n return filename.endsWith('.ts') || filename.endsWith('.tsx')\n}\n\nfunction isCommonJSFile(filename: string) {\n return filename.endsWith('.cjs')\n}\n\n// Ensure Next.js internals and .cjs files are output as CJS modules,\n// By default all modules are output as ESM or will treated as CJS if next-swc/auto-cjs plugin detects file is CJS.\nfunction shouldOutputCommonJs(filename: string) {\n return isCommonJSFile(filename) || nextDistPath.test(filename)\n}\n\nexport function getParserOptions({ filename, jsConfig, ...rest }: any) {\n const isTSFile = filename.endsWith('.ts')\n const hasTsSyntax = isTypeScriptFile(filename)\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n return {\n ...rest,\n syntax: hasTsSyntax ? 'typescript' : 'ecmascript',\n dynamicImport: true,\n decorators: enableDecorators,\n // Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags.\n [hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile,\n importAssertions: true,\n }\n}\n\nfunction getBaseSWCOptions({\n filename,\n jest,\n development,\n hasReactRefresh,\n globalWindow,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n resolvedBaseUrl,\n jsConfig,\n supportedBrowsers,\n swcCacheDir,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n isCacheComponents,\n cacheHandlers,\n useCacheEnabled,\n trackDynamicImports,\n}: {\n filename: string\n jest?: boolean\n development: boolean\n hasReactRefresh: boolean\n globalWindow: boolean\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n compilerOptions: NextConfig['compiler']\n swcPlugins: ExperimentalConfig['swcPlugins']\n resolvedBaseUrl?: ResolvedBaseUrl\n jsConfig: any\n supportedBrowsers: string[] | undefined\n swcCacheDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n isCacheComponents?: boolean\n cacheHandlers?: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n trackDynamicImports?: boolean\n}) {\n const isReactServerLayer = shouldUseReactServerCondition(bundleLayer)\n const isAppRouterPagesLayer = isWebpackAppPagesLayer(bundleLayer)\n const parserConfig = getParserOptions({ filename, jsConfig })\n const paths = jsConfig?.compilerOptions?.paths\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n const emitDecoratorMetadata = Boolean(\n jsConfig?.compilerOptions?.emitDecoratorMetadata\n )\n const useDefineForClassFields = Boolean(\n jsConfig?.compilerOptions?.useDefineForClassFields\n )\n const plugins = (swcPlugins ?? [])\n .filter(Array.isArray)\n .map(([name, options]: any) => [require.resolve(name), options])\n\n return {\n jsc: {\n ...(resolvedBaseUrl && paths\n ? {\n baseUrl: resolvedBaseUrl.baseUrl,\n paths,\n }\n : {}),\n externalHelpers: !process.versions.pnp && !jest,\n parser: parserConfig,\n experimental: {\n keepImportAttributes: true,\n emitAssertForImportAttributes: true,\n plugins,\n cacheRoot: swcCacheDir,\n },\n transform: {\n // Enables https://github.com/swc-project/swc/blob/0359deb4841be743d73db4536d4a22ac797d7f65/crates/swc_ecma_ext_transforms/src/jest.rs\n ...(jest\n ? {\n hidden: {\n jest: true,\n },\n }\n : {}),\n legacyDecorator: enableDecorators,\n decoratorMetadata: emitDecoratorMetadata,\n useDefineForClassFields: useDefineForClassFields,\n react: {\n importSource:\n jsConfig?.compilerOptions?.jsxImportSource ??\n (compilerOptions?.emotion && !isReactServerLayer\n ? '@emotion/react'\n : 'react'),\n runtime: 'automatic',\n pragmaFrag: 'React.Fragment',\n throwIfNamespace: true,\n development: !!development,\n useBuiltins: true,\n refresh: !!hasReactRefresh,\n },\n optimizer: {\n simplify: false,\n globals: jest\n ? null\n : {\n typeofs: {\n window: globalWindow ? 'object' : 'undefined',\n },\n envs: {\n NODE_ENV: development ? '\"development\"' : '\"production\"',\n },\n // TODO: handle process.browser to match babel replacing as well\n },\n },\n regenerator: {\n importPath: regeneratorRuntimePath,\n },\n },\n },\n sourceMaps: jest ? 'inline' : undefined,\n removeConsole: compilerOptions?.removeConsole,\n // disable \"reactRemoveProperties\" when \"jest\" is true\n // otherwise the setting from next.config.js will be used\n reactRemoveProperties: jest\n ? false\n : compilerOptions?.reactRemoveProperties,\n // Map the k-v map to an array of pairs.\n modularizeImports: modularizeImports\n ? Object.fromEntries(\n Object.entries(modularizeImports).map(([mod, config]) => [\n mod,\n {\n ...config,\n transform:\n typeof config.transform === 'string'\n ? config.transform\n : Object.entries(config.transform).map(([key, value]) => [\n key,\n value,\n ]),\n },\n ])\n )\n : undefined,\n relay: compilerOptions?.relay,\n // Always transform styled-jsx and error when `client-only` condition is triggered\n styledJsx: compilerOptions?.styledJsx ?? {\n useLightningcss: jsConfig?.experimental?.useLightningcss ?? false,\n },\n // Disable css-in-js libs (without client-only integration) transform on server layer for server components\n ...(!isReactServerLayer && {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n emotion: getEmotionOptions(compilerOptions?.emotion, development),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n styledComponents: getStyledComponentsOptions(\n compilerOptions?.styledComponents,\n development\n ),\n }),\n serverComponents:\n serverComponents && !jest\n ? {\n isReactServerLayer,\n cacheComponentsEnabled: isCacheComponents,\n useCacheEnabled,\n }\n : undefined,\n serverActions:\n isAppRouterPagesLayer && !jest\n ? {\n isReactServerLayer,\n isDevelopment: development,\n useCacheEnabled,\n hashSalt: serverReferenceHashSalt,\n cacheKinds: ['default', 'remote', 'private'].concat(\n cacheHandlers ? Object.keys(cacheHandlers) : []\n ),\n }\n : undefined,\n // For app router we prefer to bundle ESM,\n // On server side of pages router we prefer CJS.\n preferEsm: esm,\n lintCodemodComments: true,\n trackDynamicImports: trackDynamicImports,\n debugFunctionName: development,\n\n ...(supportedBrowsers && supportedBrowsers.length > 0\n ? {\n cssEnv: {\n targets: supportedBrowsers,\n },\n }\n : {}),\n }\n}\n\nfunction getStyledComponentsOptions(\n styledComponentsConfig: undefined | boolean | StyledComponentsConfig,\n development: any\n) {\n if (!styledComponentsConfig) {\n return null\n } else if (typeof styledComponentsConfig === 'object') {\n return {\n ...styledComponentsConfig,\n displayName: styledComponentsConfig.displayName ?? Boolean(development),\n }\n } else {\n return {\n displayName: Boolean(development),\n }\n }\n}\n\nfunction getEmotionOptions(\n emotionConfig: undefined | boolean | EmotionConfig,\n development: boolean\n) {\n if (!emotionConfig) {\n return null\n }\n let autoLabel = !!development\n if (typeof emotionConfig === 'object' && emotionConfig.autoLabel) {\n switch (emotionConfig.autoLabel) {\n case 'never':\n autoLabel = false\n break\n case 'always':\n autoLabel = true\n break\n case 'dev-only':\n break\n default:\n emotionConfig.autoLabel satisfies never\n }\n }\n return {\n enabled: true,\n autoLabel,\n sourcemap: development,\n ...(typeof emotionConfig === 'object' && {\n importMap: emotionConfig.importMap,\n labelFormat: emotionConfig.labelFormat,\n sourcemap: development && emotionConfig.sourceMap,\n }),\n }\n}\n\nexport function getJestSWCOptions({\n isServer,\n filename,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n pagesDir,\n serverReferenceHashSalt,\n}: {\n isServer: boolean\n filename: string\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n resolvedBaseUrl?: ResolvedBaseUrl\n pagesDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n}) {\n let baseOptions = getBaseSWCOptions({\n filename,\n jest: true,\n development: false,\n hasReactRefresh: false,\n globalWindow: !isServer,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n supportedBrowsers: undefined,\n esm,\n // Don't apply server layer transformations for Jest\n // Disable server / client graph assertions for Jest\n bundleLayer: undefined,\n serverComponents: false,\n serverReferenceHashSalt,\n })\n\n const useCjsModules = shouldOutputCommonJs(filename)\n return {\n ...baseOptions,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n module: {\n type: esm && !useCjsModules ? 'es6' : 'commonjs',\n },\n disableNextSsg: true,\n disablePageConfig: true,\n pagesDir,\n }\n}\n\nexport function getLoaderSWCOptions({\n // This is not passed yet as \"paths\" resolving is handled by webpack currently.\n // resolvedBaseUrl,\n filename,\n development,\n isServer,\n pagesDir,\n appDir,\n isPageFile,\n isCacheComponents,\n hasReactRefresh,\n modularizeImports,\n optimizeServerReact,\n optimizePackageImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n supportedBrowsers,\n swcCacheDir,\n relativeFilePathFromRoot,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n esm,\n cacheHandlers,\n useCacheEnabled,\n trackDynamicImports,\n}: {\n filename: string\n development: boolean\n isServer: boolean\n pagesDir?: string\n appDir?: string\n isPageFile: boolean\n hasReactRefresh: boolean\n optimizeServerReact?: boolean\n modularizeImports: NextConfig['modularizeImports']\n isCacheComponents?: boolean\n optimizePackageImports?: NonNullable<\n NextConfig['experimental']\n >['optimizePackageImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n supportedBrowsers: string[] | undefined\n swcCacheDir: string\n relativeFilePathFromRoot: string\n esm?: boolean\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n cacheHandlers: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n trackDynamicImports?: boolean\n}) {\n let baseOptions: any = getBaseSWCOptions({\n filename,\n development,\n globalWindow: !isServer,\n hasReactRefresh,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n // resolvedBaseUrl,\n supportedBrowsers,\n swcCacheDir,\n bundleLayer,\n serverComponents,\n serverReferenceHashSalt,\n esm: !!esm,\n isCacheComponents,\n cacheHandlers,\n useCacheEnabled,\n trackDynamicImports,\n })\n baseOptions.fontLoaders = {\n fontLoaders: ['next/font/local', 'next/font/google'],\n relativeFilePathFromRoot,\n }\n baseOptions.cjsRequireOptimizer = {\n packages: {\n 'next/server': {\n transforms: {\n NextRequest: 'next/dist/server/web/spec-extension/request',\n NextResponse: 'next/dist/server/web/spec-extension/response',\n ImageResponse: 'next/dist/server/web/spec-extension/image-response',\n userAgentFromString: 'next/dist/server/web/spec-extension/user-agent',\n userAgent: 'next/dist/server/web/spec-extension/user-agent',\n },\n },\n },\n }\n\n if (optimizeServerReact && isServer && !development) {\n baseOptions.optimizeServerReact = {\n optimize_use_state: false,\n }\n }\n\n // Modularize import optimization for barrel files\n if (optimizePackageImports) {\n baseOptions.autoModularizeImports = {\n packages: optimizePackageImports,\n }\n }\n\n const isNodeModules = nodeModulesPath.test(filename)\n const isAppBrowserLayer = bundleLayer === WEBPACK_LAYERS.appPagesBrowser\n const moduleResolutionConfig = shouldOutputCommonJs(filename)\n ? {\n module: {\n type: 'commonjs',\n },\n }\n : {}\n\n let options: any\n if (isServer) {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n // Disables getStaticProps/getServerSideProps tree shaking on the server compilation for pages\n disableNextSsg: true,\n disablePageConfig: true,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n preferEsm: !!esm,\n isPageFile,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n }\n } else {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n disableNextSsg: !isPageFile,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n isPageFile,\n ...(supportedBrowsers && supportedBrowsers.length > 0\n ? {\n env: {\n targets: supportedBrowsers,\n },\n }\n : {}),\n }\n if (!options.env) {\n // Matches default @babel/preset-env behavior\n options.jsc.target = 'es5'\n }\n }\n\n // For node_modules in app browser layer, we don't need to do any server side transformation.\n // Only keep server actions transform to discover server actions from client components.\n if (isAppBrowserLayer && isNodeModules) {\n options.disableNextSsg = true\n options.disablePageConfig = true\n options.isPageFile = false\n options.optimizeServerReact = undefined\n options.cjsRequireOptimizer = undefined\n // Disable optimizer for node_modules in app browser layer, to avoid unnecessary replacement.\n // e.g. typeof window could result differently in js worker or browser.\n if (\n options.jsc.transform.optimizer.globals?.typeofs &&\n !filename.includes(nextDirname)\n ) {\n delete options.jsc.transform.optimizer.globals.typeofs.window\n }\n }\n\n return options\n}\n"],"names":["getJestSWCOptions","getLoaderSWCOptions","getParserOptions","nextDirname","path","dirname","require","resolve","nextDistPath","RegExp","escapeStringRegexp","nodeModulesPath","regeneratorRuntimePath","isTypeScriptFile","filename","endsWith","isCommonJSFile","shouldOutputCommonJs","test","jsConfig","rest","isTSFile","hasTsSyntax","enableDecorators","Boolean","compilerOptions","experimentalDecorators","syntax","dynamicImport","decorators","importAssertions","getBaseSWCOptions","jest","development","hasReactRefresh","globalWindow","esm","modularizeImports","swcPlugins","resolvedBaseUrl","supportedBrowsers","swcCacheDir","serverComponents","serverReferenceHashSalt","bundleLayer","isCacheComponents","cacheHandlers","useCacheEnabled","trackDynamicImports","isReactServerLayer","shouldUseReactServerCondition","isAppRouterPagesLayer","isWebpackAppPagesLayer","parserConfig","paths","emitDecoratorMetadata","useDefineForClassFields","plugins","filter","Array","isArray","map","name","options","jsc","baseUrl","externalHelpers","process","versions","pnp","parser","experimental","keepImportAttributes","emitAssertForImportAttributes","cacheRoot","transform","hidden","legacyDecorator","decoratorMetadata","react","importSource","jsxImportSource","emotion","runtime","pragmaFrag","throwIfNamespace","useBuiltins","refresh","optimizer","simplify","globals","typeofs","window","envs","NODE_ENV","regenerator","importPath","sourceMaps","undefined","removeConsole","reactRemoveProperties","Object","fromEntries","entries","mod","config","key","value","relay","styledJsx","useLightningcss","getEmotionOptions","styledComponents","getStyledComponentsOptions","cacheComponentsEnabled","serverActions","isDevelopment","hashSalt","cacheKinds","concat","keys","preferEsm","lintCodemodComments","debugFunctionName","length","cssEnv","targets","styledComponentsConfig","displayName","emotionConfig","autoLabel","enabled","sourcemap","importMap","labelFormat","sourceMap","isServer","pagesDir","baseOptions","useCjsModules","env","node","module","type","disableNextSsg","disablePageConfig","appDir","isPageFile","optimizeServerReact","optimizePackageImports","relativeFilePathFromRoot","fontLoaders","cjsRequireOptimizer","packages","transforms","NextRequest","NextResponse","ImageResponse","userAgentFromString","userAgent","optimize_use_state","autoModularizeImports","isNodeModules","isAppBrowserLayer","WEBPACK_LAYERS","appPagesBrowser","moduleResolutionConfig","isServerCompiler","target","includes"],"mappings":";;;;;;;;;;;;;;;;IAgTgBA,iBAAiB;eAAjBA;;IA8DAC,mBAAmB;eAAnBA;;IAxUAC,gBAAgB;eAAhBA;;;6DAtCC;2BACqC;uBAQgB;8BACnC;;;;;;AAEnC,MAAMC,cAAcC,aAAI,CAACC,OAAO,CAACC,QAAQC,OAAO,CAAC;AAEjD,MAAMC,eAAe,IAAIC,OACvB,GAAGC,IAAAA,gCAAkB,EAACP,aAAa,2CAA2C,CAAC;AAGjF,MAAMQ,kBAAkB;AAExB,MAAMC,yBAAyBN,QAAQC,OAAO,CAC5C;AAGF,SAASM,iBAAiBC,QAAgB;IACxC,OAAOA,SAASC,QAAQ,CAAC,UAAUD,SAASC,QAAQ,CAAC;AACvD;AAEA,SAASC,eAAeF,QAAgB;IACtC,OAAOA,SAASC,QAAQ,CAAC;AAC3B;AAEA,qEAAqE;AACrE,mHAAmH;AACnH,SAASE,qBAAqBH,QAAgB;IAC5C,OAAOE,eAAeF,aAAaN,aAAaU,IA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yF,mBAAmB,GAAGtD;QAC9B,6FAA6F;QAC7F,uEAAuE;QACvE,IACEnC,EAAAA,2CAAAA,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,qBAAvC3B,yCAAyC4B,OAAO,KAChD,CAAC7E,SAAS2J,QAAQ,CAACtK,cACnB;YACA,OAAO4D,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,CAACC,OAAO,CAACC,MAAM;QAC/D;IACF;IAEA,OAAO7B;AACT","ignoreList":[0]}
@@ -1678,7 +1678,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1678
1678
  isClient && new _copyfileplugin.CopyFilePlugin({
1679
1679
  // file path to build output of `@next/polyfill-nomodule`
1680
1680
  filePath: require.resolve('./polyfills/polyfill-nomodule'),
1681
- cacheKey: "15.6.0-bun.2",
1681
+ cacheKey: "15.6.0-bun.4",
1682
1682
  name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
1683
1683
  minimize: false,
1684
1684
  info: {
@@ -1859,7 +1859,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1859
1859
  // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
1860
1860
  // - Next.js version
1861
1861
  // - next.config.js keys that affect compilation
1862
- version: `${__dirname}|${"15.6.0-bun.2"}|${configVars}`,
1862
+ version: `${__dirname}|${"15.6.0-bun.4"}|${configVars}`,
1863
1863
  cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
1864
1864
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1865
1865
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -1885,7 +1885,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
1885
1885
  (_webpack5Config_plugins = webpack5Config.plugins) == null ? void 0 : _webpack5Config_plugins.push((compiler)=>{
1886
1886
  compiler.hooks.done.tap('next-build-dependencies', (stats)=>{
1887
1887
  const buildDependencies = stats.compilation.buildDependencies;
1888
- const nextPackage = _path.default.dirname(require.resolve('next/package.json'));
1888
+ const nextPackage = _path.default.dirname(require.resolve('@openuiai/next/package.json'));
1889
1889
  // Remove all next.js build dependencies, they are already covered by the cacheVersion
1890
1890
  // and next.js also imports the output files which leads to broken caching.
1891
1891
  for (const dep of buildDependencies){