/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/jsconfig-paths-plugin.js (8254B)
/** * This webpack resolver is largely based on TypeScript's "paths" handling * The TypeScript license can be found here: * https://github.com/microsoft/TypeScript/blob/214df64e287804577afa1fea0184c18c40f7d1ca/LICENSE.txt */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { JsConfigPathsPlugin: null, findBestPatternMatch: null, hasZeroOrOneAsteriskCharacter: null, isString: null, matchPatternOrExact: null, matchedText: null, pathIsRelative: null, patternText: null, tryParsePattern: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { JsConfigPathsPlugin: function() { return JsConfigPathsPlugin; }, findBestPatternMatch: function() { return findBestPatternMatch; }, hasZeroOrOneAsteriskCharacter: function() { return hasZeroOrOneAsteriskCharacter; }, isString: function() { return isString; }, matchPatternOrExact: function() { return matchPatternOrExact; }, matchedText: function() { return matchedText; }, pathIsRelative: function() { return pathIsRelative; }, patternText: function() { return patternText; }, tryParsePattern: function() { return tryParsePattern; } }); const _path = /*#__PURE__*/ _interop_require_default(require("path")); const _debug = require("next/dist/compiled/debug"); function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const log = (0, _debug.debug)('next:jsconfig-paths-plugin'); const asterisk = 0x2a; function hasZeroOrOneAsteriskCharacter(str) { let seenAsterisk = false; for(let i = 0; i < str.length; i++){ if (str.charCodeAt(i) === asterisk) { if (!seenAsterisk) { seenAsterisk = true; } else { // have already seen asterisk return false; } } } return true; } function pathIsRelative(testPath) { return /^\.\.?($|[\\/])/.test(testPath); } function tryParsePattern(pattern) { // This should be verified outside of here and a proper error thrown. const indexOfStar = pattern.indexOf('*'); return indexOfStar === -1 ? undefined : { prefix: pattern.slice(0, indexOfStar), suffix: pattern.slice(indexOfStar + 1) }; } function isPatternMatch({ prefix, suffix }, candidate) { return candidate.length >= prefix.length + suffix.length && candidate.startsWith(prefix) && candidate.endsWith(suffix); } function findBestPatternMatch(values, getPattern, candidate) { let matchedValue; // use length of prefix as betterness criteria let longestMatchPrefixLength = -1; for (const v of values){ const pattern = getPattern(v); if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) { longestMatchPrefixLength = pattern.prefix.length; matchedValue = v; } } return matchedValue; } function matchPatternOrExact(patternStrings, candidate) { const patterns = []; for (const patternString of patternStrings){ if (!hasZeroOrOneAsteriskCharacter(patternString)) continue; const pattern = tryParsePattern(patternString); if (pattern) { patterns.push(pattern); } else if (patternString === candidate) { // pattern was matched as is - no need to search further return patternString; } } return findBestPatternMatch(patterns, (_)=>_, candidate); } function isString(text) { return typeof text === 'string'; } function matchedText(pattern, candidate) { return candidate.substring(pattern.prefix.length, candidate.length - pattern.suffix.length); } function patternText({ prefix, suffix }) { return `${prefix}*${suffix}`; } /** * Calls the iterator function for each entry of the array * until the first result or error is reached */ function forEachBail(array, iterator, callback) { if (array.length === 0) return callback(); let i = 0; const next = ()=>{ let loop = undefined; iterator(array[i++], (err, result)=>{ if (err || result !== undefined || i >= array.length) { return callback(err, result); } if (loop === false) while(next()); loop = true; }); if (!loop) loop = false; return loop; }; while(next()); } const NODE_MODULES_REGEX = /node_modules/; class JsConfigPathsPlugin { constructor(paths, resolvedBaseUrl){ this.paths = paths; this.resolvedBaseUrl = resolvedBaseUrl; this.jsConfigPlugin = true; log('tsconfig.json or jsconfig.json paths: %O', paths); log('resolved baseUrl: %s', resolvedBaseUrl); } apply(resolver) { const target = resolver.ensureHook('resolve'); resolver.getHook('described-resolve').tapAsync('JsConfigPathsPlugin', (request, resolveContext, callback)=>{ const resolvedBaseUrl = this.resolvedBaseUrl; if (resolvedBaseUrl === undefined) { return callback(); } const paths = this.paths; const pathsKeys = Object.keys(paths); // If no aliases are added bail out if (pathsKeys.length === 0) { log('paths are empty, bailing out'); return callback(); } const moduleName = request.request; // Exclude node_modules from paths support (speeds up resolving) if (request.path.match(NODE_MODULES_REGEX)) { log('skipping request as it is inside node_modules %s', moduleName); return callback(); } if (_path.default.posix.isAbsolute(moduleName) || process.platform === 'win32' && _path.default.win32.isAbsolute(moduleName)) { log('skipping request as it is an absolute path %s', moduleName); return callback(); } if (pathIsRelative(moduleName)) { log('skipping request as it is a relative path %s', moduleName); return callback(); } // log('starting to resolve request %s', moduleName) // If the module name does not match any of the patterns in `paths` we hand off resolving to webpack const matchedPattern = matchPatternOrExact(pathsKeys, moduleName); if (!matchedPattern) { log('moduleName did not match any paths pattern %s', moduleName); return callback(); } const matchedStar = isString(matchedPattern) ? undefined : matchedText(matchedPattern, moduleName); const matchedPatternText = isString(matchedPattern) ? matchedPattern : patternText(matchedPattern); let triedPaths = []; forEachBail(paths[matchedPatternText], (subst, pathCallback)=>{ const curPath = matchedStar ? subst.replace('*', matchedStar) : subst; // Ensure .d.ts is not matched if (curPath.endsWith('.d.ts')) { // try next path candidate return pathCallback(); } const candidate = _path.default.join(resolvedBaseUrl.baseUrl, curPath); const obj = Object.assign({}, request, { request: candidate }); resolver.doResolve(target, obj, `Aliased with tsconfig.json or jsconfig.json ${matchedPatternText} to ${candidate}`, resolveContext, (resolverErr, resolverResult)=>{ if (resolverErr || resolverResult === undefined) { triedPaths.push(candidate); // try next path candidate return pathCallback(); } return pathCallback(resolverErr, resolverResult); }); }, callback); }); } } //# sourceMappingURL=jsconfig-paths-plugin.js.map