MCPcopy Index your code
hub / github.com/Packstack-Tech/packstack / resolveModule

Function resolveModule

frontend/config/paths.js:57–67  ·  view source on GitHub ↗
(resolveFn, filePath)

Source from the content-addressed store, hash-verified

55
56// Resolve file paths in the same order as webpack
57const resolveModule = (resolveFn, filePath) => {
58 const extension = moduleFileExtensions.find(extension =>
59 fs.existsSync(resolveFn(`${filePath}.${extension}`))
60 );
61
62 if (extension) {
63 return resolveFn(`${filePath}.${extension}`);
64 }
65
66 return resolveFn(`${filePath}.js`);
67};
68
69// config after eject: we're in ./config/
70module.exports = {

Callers 1

paths.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected