/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
build
/
webpack
/
plugins
/
/opt/canhelp/node_modules/next/dist/build/webpack/plugins
mkdir
upload
Name
Size
Mode
Actions
minify-webpack-plugin/
-
0755
rm
next-types-plugin/
-
0755
rm
telemetry-plugin/
-
0755
rm
wellknown-errors-plugin/
-
0755
rm
app-build-manifest-plugin.d.ts
288
0644
edit
dl
rm
app-build-manifest-plugin.js
2285
0644
edit
dl
rm
app-build-manifest-plugin.js.map
3649
0644
edit
dl
rm
build-manifest-plugin.d.ts
1880
0644
edit
dl
rm
build-manifest-plugin.js
12769
0644
edit
dl
rm
build-manifest-plugin.js.map
20566
0644
edit
dl
rm
copy-file-plugin.d.ts
415
0644
edit
dl
rm
copy-file-plugin.js
2390
0644
edit
dl
rm
copy-file-plugin.js.map
3855
0644
edit
dl
rm
css-chunking-plugin.d.ts
175
0644
edit
dl
rm
css-chunking-plugin.js
14178
0644
edit
dl
rm
css-chunking-plugin.js.map
20162
0644
edit
dl
rm
css-minimizer-plugin.d.ts
574
0644
edit
dl
rm
css-minimizer-plugin.js
4170
0644
edit
dl
rm
css-minimizer-plugin.js.map
6642
0644
edit
dl
rm
devtools-ignore-list-plugin.d.ts
775
0644
edit
dl
rm
devtools-ignore-list-plugin.js
3367
0644
edit
dl
rm
devtools-ignore-list-plugin.js.map
5702
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.d.ts
869
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js
10144
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js.map
17802
0644
edit
dl
rm
flight-client-entry-plugin.d.ts
3040
0644
edit
dl
rm
flight-client-entry-plugin.js
40923
0644
edit
dl
rm
flight-client-entry-plugin.js.map
65905
0644
edit
dl
rm
flight-manifest-plugin.d.ts
2144
0644
edit
dl
rm
flight-manifest-plugin.js
23049
0644
edit
dl
rm
flight-manifest-plugin.js.map
33545
0644
edit
dl
rm
jsconfig-paths-plugin.d.ts
2248
0644
edit
dl
rm
jsconfig-paths-plugin.js
8254
0644
edit
dl
rm
jsconfig-paths-plugin.js.map
14283
0644
edit
dl
rm
memory-with-gc-cache-plugin.d.ts
517
0644
edit
dl
rm
memory-with-gc-cache-plugin.js
4695
0644
edit
dl
rm
memory-with-gc-cache-plugin.js.map
6989
0644
edit
dl
rm
middleware-plugin.d.ts
1783
0644
edit
dl
rm
middleware-plugin.js
29617
0644
edit
dl
rm
middleware-plugin.js.map
49521
0644
edit
dl
rm
mini-css-extract-plugin.d.ts
190
0644
edit
dl
rm
mini-css-extract-plugin.js
724
0644
edit
dl
rm
mini-css-extract-plugin.js.map
568
0644
edit
dl
rm
next-drop-client-page-plugin.d.ts
305
0644
edit
dl
rm
next-drop-client-page-plugin.js
3561
0644
edit
dl
rm
next-drop-client-page-plugin.js.map
5232
0644
edit
dl
rm
next-font-manifest-plugin.d.ts
1373
0644
edit
dl
rm
next-font-manifest-plugin.js
6814
0644
edit
dl
rm
next-font-manifest-plugin.js.map
10868
0644
edit
dl
rm
next-trace-entrypoints-plugin.d.ts
2418
0644
edit
dl
rm
next-trace-entrypoints-plugin.js
29635
0644
edit
dl
rm
next-trace-entrypoints-plugin.js.map
45878
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.d.ts
416
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js
2194
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js.map
3451
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.d.ts
140
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js
2115
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js.map
3039
0644
edit
dl
rm
pages-manifest-plugin.d.ts
754
0644
edit
dl
rm
pages-manifest-plugin.js
5889
0644
edit
dl
rm
pages-manifest-plugin.js.map
9206
0644
edit
dl
rm
profiling-plugin.d.ts
926
0644
edit
dl
rm
profiling-plugin.js
13484
0644
edit
dl
rm
profiling-plugin.js.map
22355
0644
edit
dl
rm
react-loadable-plugin.d.ts
1591
0644
edit
dl
rm
react-loadable-plugin.js
8322
0644
edit
dl
rm
react-loadable-plugin.js.map
13547
0644
edit
dl
rm
rspack-flight-client-entry-plugin.d.ts
789
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js
4422
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js.map
7965
0644
edit
dl
rm
rspack-profiling-plugin.d.ts
284
0644
edit
dl
rm
rspack-profiling-plugin.js
2949
0644
edit
dl
rm
rspack-profiling-plugin.js.map
3862
0644
edit
dl
rm
slow-module-detection-plugin.d.ts
413
0644
edit
dl
rm
slow-module-detection-plugin.js
8580
0644
edit
dl
rm
slow-module-detection-plugin.js.map
13744
0644
edit
dl
rm
subresource-integrity-plugin.d.ts
326
0644
edit
dl
rm
subresource-integrity-plugin.js
2653
0644
edit
dl
rm
subresource-integrity-plugin.js.map
4355
0644
edit
dl
rm
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
Save
cmd:
run