MCPcopy Index your code
hub / github.com/rollup/plugins / resolveWithClassic

Function resolveWithClassic

packages/node-resolve/src/resolveImportSpecifiers.js:248–289  ·  view source on GitHub ↗
({
  importer,
  importSpecifierList,
  exportConditions,
  warn,
  packageInfoCache,
  extensions,
  mainFields,
  preserveSymlinks,
  useBrowserOverrides,
  baseDir,
  moduleDirectories,
  modulePaths,
  rootDir,
  ignoreSideEffectsForRoot
})

Source from the content-addressed store, hash-verified

246}
247
248async function resolveWithClassic({
249 importer,
250 importSpecifierList,
251 exportConditions,
252 warn,
253 packageInfoCache,
254 extensions,
255 mainFields,
256 preserveSymlinks,
257 useBrowserOverrides,
258 baseDir,
259 moduleDirectories,
260 modulePaths,
261 rootDir,
262 ignoreSideEffectsForRoot
263}) {
264 for (let i = 0; i < importSpecifierList.length; i++) {
265 // eslint-disable-next-line no-await-in-loop
266 const result = await resolveIdClassic({
267 importer,
268 importSpecifier: importSpecifierList[i],
269 exportConditions,
270 warn,
271 packageInfoCache,
272 extensions,
273 mainFields,
274 preserveSymlinks,
275 useBrowserOverrides,
276 baseDir,
277 moduleDirectories,
278 modulePaths,
279 rootDir,
280 ignoreSideEffectsForRoot
281 });
282
283 if (result) {
284 return result;
285 }
286 }
287
288 return null;
289}
290
291// Resolves to the module if found or `null`.
292// The first import specifier will first be attempted with the exports algorithm.

Callers 1

resolveImportSpecifiersFunction · 0.85

Calls 1

resolveIdClassicFunction · 0.85

Tested by

no test coverage detected