MCPcopy Create free account
hub / github.com/Ainias/beyondPrinting / resolveModule

Function resolveModule

config/paths.js:26–34  ·  view source on GitHub ↗
(resolveFn, filePath)

Source from the content-addressed store, hash-verified

24
25// Resolve file paths in the same order as webpack
26const resolveModule = (resolveFn, filePath) => {
27 const extension = moduleFileExtensions.find((extension) => fs.existsSync(resolveFn(`${filePath}.${extension}`)));
28
29 if (extension) {
30 return resolveFn(`${filePath}.${extension}`);
31 }
32
33 return resolveFn(`${filePath}.js`);
34};
35
36// config after eject: we're in ./config/
37module.exports = {

Callers 1

paths.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected