/opt/canhelp/node_modules/next/dist/esm/build/webpack/plugins
NameSizeModeActions
minify-webpack-plugin/-0755rm
next-types-plugin/-0755rm
telemetry-plugin/-0755rm
wellknown-errors-plugin/-0755rm
app-build-manifest-plugin.js18510644editdlrm
app-build-manifest-plugin.js.map36960644editdlrm
build-manifest-plugin.js117840644editdlrm
build-manifest-plugin.js.map206200644editdlrm
copy-file-plugin.js19980644editdlrm
copy-file-plugin.js.map39100644editdlrm
css-chunking-plugin.js139620644editdlrm
css-chunking-plugin.js.map201440644editdlrm
css-minimizer-plugin.js36210644editdlrm
css-minimizer-plugin.js.map66680644editdlrm
devtools-ignore-list-plugin.js31550644editdlrm
devtools-ignore-list-plugin.js.map57030644editdlrm
eval-source-map-dev-tool-plugin.js99510644editdlrm
eval-source-map-dev-tool-plugin.js.map178140644editdlrm
flight-client-entry-plugin.js398790644editdlrm
flight-client-entry-plugin.js.map659620644editdlrm
flight-manifest-plugin.js213930644editdlrm
flight-manifest-plugin.js.map336560644editdlrm
jsconfig-paths-plugin.js75200644editdlrm
jsconfig-paths-plugin.js.map141880644editdlrm
memory-with-gc-cache-plugin.js44670644editdlrm
memory-with-gc-cache-plugin.js.map69750644editdlrm
middleware-plugin.js284630644editdlrm
middleware-plugin.js.map496570644editdlrm
mini-css-extract-plugin.js3500644editdlrm
mini-css-extract-plugin.js.map5590644editdlrm
next-drop-client-page-plugin.js31350644editdlrm
next-drop-client-page-plugin.js.map52260644editdlrm
next-font-manifest-plugin.js72180644editdlrm
next-font-manifest-plugin.js.map109220644editdlrm
next-trace-entrypoints-plugin.js285710644editdlrm
next-trace-entrypoints-plugin.js.map459250644editdlrm
nextjs-require-cache-hot-reloader.js18170644editdlrm
nextjs-require-cache-hot-reloader.js.map34600644editdlrm
optional-peer-dependency-resolve-plugin.js18610644editdlrm
optional-peer-dependency-resolve-plugin.js.map30230644editdlrm
pages-manifest-plugin.js47200644editdlrm
pages-manifest-plugin.js.map91820644editdlrm
profiling-plugin.js127420644editdlrm
profiling-plugin.js.map223290644editdlrm
react-loadable-plugin.js78730644editdlrm
react-loadable-plugin.js.map135570644editdlrm
rspack-flight-client-entry-plugin.js40290644editdlrm
rspack-flight-client-entry-plugin.js.map80080644editdlrm
rspack-profiling-plugin.js24360644editdlrm
rspack-profiling-plugin.js.map38280644editdlrm
slow-module-detection-plugin.js83300644editdlrm
slow-module-detection-plugin.js.map137340644editdlrm
subresource-integrity-plugin.js22380644editdlrm
subresource-integrity-plugin.js.map43800644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/build/webpack/plugins/pages-manifest-plugin.js (4720B)
import path from 'path'; import fs from 'fs/promises'; import { webpack, sources } from 'next/dist/compiled/webpack/webpack'; import { PAGES_MANIFEST, APP_PATHS_MANIFEST } from '../../../shared/lib/constants'; import getRouteFromEntrypoint from '../../../server/get-route-from-entrypoint'; import { normalizePathSep } from '../../../shared/lib/page-path/normalize-path-sep'; export let edgeServerPages = {}; export let nodeServerPages = {}; export let edgeServerAppPaths = {}; export let nodeServerAppPaths = {}; // This plugin creates a pages-manifest.json from page entrypoints. // This is used for mapping paths like `/` to `.next/server/static//pages/index.js` when doing SSR // It's also used by next export to provide defaultPathMap export default class PagesManifestPlugin { constructor({ dev, distDir, isEdgeRuntime, appDirEnabled }){ this.dev = dev; this.distDir = distDir; this.isEdgeRuntime = isEdgeRuntime; this.appDirEnabled = appDirEnabled; } async createAssets(compilation) { const entrypoints = compilation.entrypoints; const pages = {}; const appPaths = {}; for (const entrypoint of entrypoints.values()){ const pagePath = getRouteFromEntrypoint(entrypoint.name, this.appDirEnabled); if (!pagePath) { continue; } const files = entrypoint.getFiles().filter((file)=>!file.includes('webpack-runtime') && !file.includes('webpack-api-runtime') && file.endsWith('.js')); // Skip entries which are empty if (!files.length) { continue; } // Write filename, replace any backslashes in path (on windows) with forwardslashes for cross-platform consistency. let file = files[files.length - 1]; if (!this.dev) { if (!this.isEdgeRuntime) { file = file.slice(3); } } file = normalizePathSep(file); if (entrypoint.name.startsWith('app/')) { appPaths[pagePath] = file; } else { pages[pagePath] = file; } } // This plugin is used by both the Node server and Edge server compilers, // we need to merge both pages to generate the full manifest. if (this.isEdgeRuntime) { edgeServerPages = pages; edgeServerAppPaths = appPaths; } else { nodeServerPages = pages; nodeServerAppPaths = appPaths; } // handle parallel compilers writing to the same // manifest path by merging existing manifest with new const writeMergedManifest = async (manifestPath, entries)=>{ await fs.mkdir(path.dirname(manifestPath), { recursive: true }); await fs.writeFile(manifestPath, JSON.stringify({ ...await fs.readFile(manifestPath, 'utf8').then((res)=>JSON.parse(res)).catch(()=>({})), ...entries }, null, 2)); }; if (this.distDir) { const pagesManifestPath = path.join(this.distDir, 'server', PAGES_MANIFEST); await writeMergedManifest(pagesManifestPath, { ...edgeServerPages, ...nodeServerPages }); } else { const pagesManifestPath = (!this.dev && !this.isEdgeRuntime ? '../' : '') + PAGES_MANIFEST; compilation.emitAsset(pagesManifestPath, new sources.RawSource(JSON.stringify({ ...edgeServerPages, ...nodeServerPages }, null, 2))); } if (this.appDirEnabled) { if (this.distDir) { const appPathsManifestPath = path.join(this.distDir, 'server', APP_PATHS_MANIFEST); await writeMergedManifest(appPathsManifestPath, { ...edgeServerAppPaths, ...nodeServerAppPaths }); } else { compilation.emitAsset((!this.dev && !this.isEdgeRuntime ? '../' : '') + APP_PATHS_MANIFEST, new sources.RawSource(JSON.stringify({ ...edgeServerAppPaths, ...nodeServerAppPaths }, null, 2))); } } } apply(compiler) { compiler.hooks.make.tap('NextJsPagesManifest', (compilation)=>{ compilation.hooks.processAssets.tapPromise({ name: 'NextJsPagesManifest', stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS }, ()=>this.createAssets(compilation)); }); } } //# sourceMappingURL=pages-manifest-plugin.js.map