/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 (6814B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "NextFontManifestPlugin", { enumerable: true, get: function() { return NextFontManifestPlugin; } }); const _webpack = require("next/dist/compiled/webpack/webpack"); const _getroutefromentrypoint = /*#__PURE__*/ _interop_require_default(require("../../../server/get-route-from-entrypoint")); const _constants = require("../../../shared/lib/constants"); const _utils = require("../utils"); const _path = /*#__PURE__*/ _interop_require_default(require("path")); function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const PLUGIN_NAME = 'NextFontManifestPlugin'; /** * When calling font functions with next/font, you can specify if you'd like the font to be preloaded (true by default). * e.g.: const inter = Inter({ subsets: ['latin'], preload: true }) * * In that case, next-font-loader will emit the font file as [name].p.[ext] instead of [name].[ext] * This function returns those files from an array that can include both preloaded and non-preloaded files. */ function getPreloadedFontFiles(fontFiles) { return fontFiles.filter((file)=>/\.p\.(woff|woff2|eot|ttf|otf)$/.test(file)); } /** * Similarly to getPreloadedFontFiles, but returns true if some of the files includes -s in the name. * This means that a font is using size adjust in its fallback font. * This was added to enable adding data-size-adjust="true" to the dom, used by the Google Aurora team to collect statistics. */ function getPageIsUsingSizeAdjust(fontFiles) { return fontFiles.some((file)=>file.includes('-s')); } class NextFontManifestPlugin { constructor(options){ this.appDir = options.appDir; } apply(compiler) { compiler.hooks.make.tap(PLUGIN_NAME, (compilation)=>{ // In this stage the font files are emitted and we can collect all files emitted by each chunkGroup (entry). compilation.hooks.processAssets.tap({ name: PLUGIN_NAME, stage: _webpack.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS }, ()=>{ const nextFontManifest = { pages: {}, app: {}, appUsingSizeAdjust: false, pagesUsingSizeAdjust: false }; if (this.appDir) { const appDirBase = _path.default.dirname(this.appDir) + _path.default.sep; // After all modules are created, we collect the modules that was created by next-font-loader. (0, _utils.traverseModules)(compilation, (mod, _chunk, chunkGroup)=>{ var _mod_request; if (mod == null ? void 0 : (_mod_request = mod.request) == null ? void 0 : _mod_request.includes('/next-font-loader/index.js?')) { var _mod_buildInfo; if (!((_mod_buildInfo = mod.buildInfo) == null ? void 0 : _mod_buildInfo.assets)) return; const chunkEntryName = (appDirBase + chunkGroup.name).replace(/[\\/]/g, _path.default.sep); const modAssets = Object.keys(mod.buildInfo.assets); const fontFiles = modAssets.filter((file)=>/\.(woff|woff2|eot|ttf|otf)$/.test(file)); // Look if size-adjust fallback font is being used if (!nextFontManifest.appUsingSizeAdjust) { nextFontManifest.appUsingSizeAdjust = getPageIsUsingSizeAdjust(fontFiles); } const preloadedFontFiles = getPreloadedFontFiles(fontFiles); // Add an entry of the module's font files in the manifest. // We'll add an entry even if no files should preload. // When an entry is present but empty, instead of preloading the font files, a preconnect tag is added. if (fontFiles.length > 0) { if (!nextFontManifest.app[chunkEntryName]) { nextFontManifest.app[chunkEntryName] = []; } nextFontManifest.app[chunkEntryName].push(...preloadedFontFiles); } } }, (chunkGroup)=>{ var _chunkGroup_name; // Only loop through entrypoints that are under app/. return !!((_chunkGroup_name = chunkGroup.name) == null ? void 0 : _chunkGroup_name.startsWith('app/')); }); } // Look at all the entrypoints created for pages/. for (const entrypoint of compilation.entrypoints.values()){ const pagePath = (0, _getroutefromentrypoint.default)(entrypoint.name); if (!pagePath) { continue; } // Get font files from the chunks included in the entrypoint. const fontFiles = entrypoint.chunks.flatMap((chunk)=>[ ...chunk.auxiliaryFiles ]).filter((file)=>/\.(woff|woff2|eot|ttf|otf)$/.test(file)); // Look if size-adjust fallback font is being used if (!nextFontManifest.pagesUsingSizeAdjust) { nextFontManifest.pagesUsingSizeAdjust = getPageIsUsingSizeAdjust(fontFiles); } const preloadedFontFiles = getPreloadedFontFiles(fontFiles); // Add an entry of the route's font files in the manifest. // We'll add an entry even if no files should preload. // When an entry is present but empty, instead of preloading the font files, a preconnect tag is added. if (fontFiles.length > 0) { nextFontManifest.pages[pagePath] = preloadedFontFiles; } } const manifest = JSON.stringify(nextFontManifest, null); // Create manifest for edge compilation.emitAsset(`server/${_constants.NEXT_FONT_MANIFEST}.js`, new _webpack.sources.RawSource(`self.__NEXT_FONT_MANIFEST=${JSON.stringify(manifest)}`)); // Create manifest for server compilation.emitAsset(`server/${_constants.NEXT_FONT_MANIFEST}.json`, new _webpack.sources.RawSource(manifest)); }); }); return; } } //# sourceMappingURL=next-font-manifest-plugin.js.map