/opt/canhelp/node_modules/next/dist/build/webpack/plugins
NameSizeModeActions
minify-webpack-plugin/-0755rm
next-types-plugin/-0755rm
telemetry-plugin/-0755rm
wellknown-errors-plugin/-0755rm
app-build-manifest-plugin.d.ts2880644editdlrm
app-build-manifest-plugin.js22850644editdlrm
app-build-manifest-plugin.js.map36490644editdlrm
build-manifest-plugin.d.ts18800644editdlrm
build-manifest-plugin.js127690644editdlrm
build-manifest-plugin.js.map205660644editdlrm
copy-file-plugin.d.ts4150644editdlrm
copy-file-plugin.js23900644editdlrm
copy-file-plugin.js.map38550644editdlrm
css-chunking-plugin.d.ts1750644editdlrm
css-chunking-plugin.js141780644editdlrm
css-chunking-plugin.js.map201620644editdlrm
css-minimizer-plugin.d.ts5740644editdlrm
css-minimizer-plugin.js41700644editdlrm
css-minimizer-plugin.js.map66420644editdlrm
devtools-ignore-list-plugin.d.ts7750644editdlrm
devtools-ignore-list-plugin.js33670644editdlrm
devtools-ignore-list-plugin.js.map57020644editdlrm
eval-source-map-dev-tool-plugin.d.ts8690644editdlrm
eval-source-map-dev-tool-plugin.js101440644editdlrm
eval-source-map-dev-tool-plugin.js.map178020644editdlrm
flight-client-entry-plugin.d.ts30400644editdlrm
flight-client-entry-plugin.js409230644editdlrm
flight-client-entry-plugin.js.map659050644editdlrm
flight-manifest-plugin.d.ts21440644editdlrm
flight-manifest-plugin.js230490644editdlrm
flight-manifest-plugin.js.map335450644editdlrm
jsconfig-paths-plugin.d.ts22480644editdlrm
jsconfig-paths-plugin.js82540644editdlrm
jsconfig-paths-plugin.js.map142830644editdlrm
memory-with-gc-cache-plugin.d.ts5170644editdlrm
memory-with-gc-cache-plugin.js46950644editdlrm
memory-with-gc-cache-plugin.js.map69890644editdlrm
middleware-plugin.d.ts17830644editdlrm
middleware-plugin.js296170644editdlrm
middleware-plugin.js.map495210644editdlrm
mini-css-extract-plugin.d.ts1900644editdlrm
mini-css-extract-plugin.js7240644editdlrm
mini-css-extract-plugin.js.map5680644editdlrm
next-drop-client-page-plugin.d.ts3050644editdlrm
next-drop-client-page-plugin.js35610644editdlrm
next-drop-client-page-plugin.js.map52320644editdlrm
next-font-manifest-plugin.d.ts13730644editdlrm
next-font-manifest-plugin.js68140644editdlrm
next-font-manifest-plugin.js.map108680644editdlrm
next-trace-entrypoints-plugin.d.ts24180644editdlrm
next-trace-entrypoints-plugin.js296350644editdlrm
next-trace-entrypoints-plugin.js.map458780644editdlrm
nextjs-require-cache-hot-reloader.d.ts4160644editdlrm
nextjs-require-cache-hot-reloader.js21940644editdlrm
nextjs-require-cache-hot-reloader.js.map34510644editdlrm
optional-peer-dependency-resolve-plugin.d.ts1400644editdlrm
optional-peer-dependency-resolve-plugin.js21150644editdlrm
optional-peer-dependency-resolve-plugin.js.map30390644editdlrm
pages-manifest-plugin.d.ts7540644editdlrm
pages-manifest-plugin.js58890644editdlrm
pages-manifest-plugin.js.map92060644editdlrm
profiling-plugin.d.ts9260644editdlrm
profiling-plugin.js134840644editdlrm
profiling-plugin.js.map223550644editdlrm
react-loadable-plugin.d.ts15910644editdlrm
react-loadable-plugin.js83220644editdlrm
react-loadable-plugin.js.map135470644editdlrm
rspack-flight-client-entry-plugin.d.ts7890644editdlrm
rspack-flight-client-entry-plugin.js44220644editdlrm
rspack-flight-client-entry-plugin.js.map79650644editdlrm
rspack-profiling-plugin.d.ts2840644editdlrm
rspack-profiling-plugin.js29490644editdlrm
rspack-profiling-plugin.js.map38620644editdlrm
slow-module-detection-plugin.d.ts4130644editdlrm
slow-module-detection-plugin.js85800644editdlrm
slow-module-detection-plugin.js.map137440644editdlrm
subresource-integrity-plugin.d.ts3260644editdlrm
subresource-integrity-plugin.js26530644editdlrm
subresource-integrity-plugin.js.map43550644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/build/webpack/plugins/next-font-manifest-plugin.js.map (10868B)
{"version":3,"sources":["../../../../src/build/webpack/plugins/next-font-manifest-plugin.ts"],"sourcesContent":["import { webpack, sources } from 'next/dist/compiled/webpack/webpack'\nimport getRouteFromEntrypoint from '../../../server/get-route-from-entrypoint'\nimport { NEXT_FONT_MANIFEST } from '../../../shared/lib/constants'\nimport { traverseModules } from '../utils'\nimport path from 'path'\n\nexport type NextFontManifest = {\n pages: {\n [path: string]: string[]\n }\n app: {\n [entry: string]: string[]\n }\n appUsingSizeAdjust: boolean\n pagesUsingSizeAdjust: boolean\n}\nconst PLUGIN_NAME = 'NextFontManifestPlugin'\n\n/**\n * When calling font functions with next/font, you can specify if you'd like the font to be preloaded (true by default).\n * e.g.: const inter = Inter({ subsets: ['latin'], preload: true })\n *\n * In that case, next-font-loader will emit the font file as [name].p.[ext] instead of [name].[ext]\n * This function returns those files from an array that can include both preloaded and non-preloaded files.\n */\nfunction getPreloadedFontFiles(fontFiles: string[]) {\n return fontFiles.filter((file: string) =>\n /\\.p\\.(woff|woff2|eot|ttf|otf)$/.test(file)\n )\n}\n\n/**\n * Similarly to getPreloadedFontFiles, but returns true if some of the files includes -s in the name.\n * This means that a font is using size adjust in its fallback font.\n * This was added to enable adding data-size-adjust=\"true\" to the dom, used by the Google Aurora team to collect statistics.\n */\nfunction getPageIsUsingSizeAdjust(fontFiles: string[]) {\n return fontFiles.some((file) => file.includes('-s'))\n}\n\n/**\n * The NextFontManifestPlugin collects all font files emitted by next-font-loader and creates a manifest file.\n * The manifest file is used in the Next.js render functions (_document.tsx for pages/ and app-render for app/) to add preload tags for the font files.\n * We only want to att preload fonts that are used by the current route.\n *\n * For pages/ the plugin finds the fonts imported in the entrypoint chunks and creates a map:\n * { [route]: fontFile[] }\n * When rendering the app in _document.tsx, it gets the font files to preload: manifest.pages[currentRouteBeingRendered].\n *\n * For app/, the manifest is a bit different.\n * Instead of creating a map of route to font files, it creates a map of the webpack module request to font files.\n * { [webpackModuleRequest]: fontFile[]]}\n * When creating the component tree in app-render it looks for font files to preload: manifest.app[moduleBeingRendered]\n */\nexport class NextFontManifestPlugin {\n private appDir: undefined | string\n\n constructor(options: { appDir: undefined | string }) {\n this.appDir = options.appDir\n }\n\n apply(compiler: webpack.Compiler) {\n compiler.hooks.make.tap(PLUGIN_NAME, (compilation) => {\n // In this stage the font files are emitted and we can collect all files emitted by each chunkGroup (entry).\n compilation.hooks.processAssets.tap(\n {\n name: PLUGIN_NAME,\n stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,\n },\n () => {\n const nextFontManifest: NextFontManifest = {\n pages: {},\n app: {},\n appUsingSizeAdjust: false,\n pagesUsingSizeAdjust: false,\n }\n\n if (this.appDir) {\n const appDirBase = path.dirname(this.appDir) + path.sep\n\n // After all modules are created, we collect the modules that was created by next-font-loader.\n traverseModules(\n compilation,\n (mod, _chunk, chunkGroup) => {\n if (mod?.request?.includes('/next-font-loader/index.js?')) {\n if (!mod.buildInfo?.assets) return\n\n const chunkEntryName = (appDirBase + chunkGroup.name).replace(\n /[\\\\/]/g,\n path.sep\n )\n\n const modAssets = Object.keys(mod.buildInfo.assets)\n const fontFiles: string[] = modAssets.filter((file: string) =>\n /\\.(woff|woff2|eot|ttf|otf)$/.test(file)\n )\n\n // Look if size-adjust fallback font is being used\n if (!nextFontManifest.appUsingSizeAdjust) {\n nextFontManifest.appUsingSizeAdjust =\n getPageIsUsingSizeAdjust(fontFiles)\n }\n\n const preloadedFontFiles = getPreloadedFontFiles(fontFiles)\n\n // Add an entry of the module's font files in the manifest.\n // We'll add an entry even if no files should preload.\n // When an entry is present but empty, instead of preloading the font files, a preconnect tag is added.\n if (fontFiles.length > 0) {\n if (!nextFontManifest.app[chunkEntryName]) {\n nextFontManifest.app[chunkEntryName] = []\n }\n nextFontManifest.app[chunkEntryName].push(\n ...preloadedFontFiles\n )\n }\n }\n },\n (chunkGroup) => {\n // Only loop through entrypoints that are under app/.\n return !!chunkGroup.name?.startsWith('app/')\n }\n )\n }\n\n // Look at all the entrypoints created for pages/.\n for (const entrypoint of compilation.entrypoints.values()) {\n const pagePath = getRouteFromEntrypoint(entrypoint.name!)\n\n if (!pagePath) {\n continue\n }\n\n // Get font files from the chunks included in the entrypoint.\n const fontFiles: string[] = entrypoint.chunks\n .flatMap((chunk: any) => [...chunk.auxiliaryFiles])\n .filter((file: string) =>\n /\\.(woff|woff2|eot|ttf|otf)$/.test(file)\n )\n\n // Look if size-adjust fallback font is being used\n if (!nextFontManifest.pagesUsingSizeAdjust) {\n nextFontManifest.pagesUsingSizeAdjust =\n getPageIsUsingSizeAdjust(fontFiles)\n }\n\n const preloadedFontFiles = getPreloadedFontFiles(fontFiles)\n\n // Add an entry of the route's font files in the manifest.\n // We'll add an entry even if no files should preload.\n // When an entry is present but empty, instead of preloading the font files, a preconnect tag is added.\n if (fontFiles.length > 0) {\n nextFontManifest.pages[pagePath] = preloadedFontFiles\n }\n }\n\n const manifest = JSON.stringify(nextFontManifest, null)\n // Create manifest for edge\n compilation.emitAsset(\n `server/${NEXT_FONT_MANIFEST}.js`,\n new sources.RawSource(\n `self.__NEXT_FONT_MANIFEST=${JSON.stringify(manifest)}`\n ) as unknown as webpack.sources.RawSource\n )\n\n // Create manifest for server\n compilation.emitAsset(\n `server/${NEXT_FONT_MANIFEST}.json`,\n new sources.RawSource(\n manifest\n ) as unknown as webpack.sources.RawSource\n )\n }\n )\n })\n return\n }\n}\n"],"names":["NextFontManifestPlugin","PLUGIN_NAME","getPreloadedFontFiles","fontFiles","filter","file","test","getPageIsUsingSizeAdjust","some","includes","constructor","options","appDir","apply","compiler","hooks","make","tap","compilation","processAssets","name","stage","webpack","Compilation","PROCESS_ASSETS_STAGE_ADDITIONS","nextFontManifest","pages","app","appUsingSizeAdjust","pagesUsingSizeAdjust","appDirBase","path","dirname","sep","traverseModules","mod","_chunk","chunkGroup","request","buildInfo","assets","chunkEntryName","replace","modAssets","Object","keys","preloadedFontFiles","length","push","startsWith","entrypoint","entrypoints","values","pagePath","getRouteFromEntrypoint","chunks","flatMap","chunk","auxiliaryFiles","manifest","JSON","stringify","emitAsset","NEXT_FONT_MANIFEST","sources","RawSource"],"mappings":";;;;+BAsDaA;;;eAAAA;;;yBA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