|
|
@ -35,12 +35,13 @@ class CustomResolver {
|
|
|
|
const resolvedDir =
|
|
|
|
const resolvedDir =
|
|
|
|
path.join(__dirname, match.groups.dir, dirPath.join('/'))
|
|
|
|
path.join(__dirname, match.groups.dir, dirPath.join('/'))
|
|
|
|
|
|
|
|
|
|
|
|
let selectedPath = request.request
|
|
|
|
// Default to basic (no extension)
|
|
|
|
|
|
|
|
let selectedPath = path.join(resolvedDir, componentDir)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Attempt a few paths with an extension, just in case
|
|
|
|
const pathsToCheck = [
|
|
|
|
const pathsToCheck = [
|
|
|
|
path.join(resolvedDir, componentDir, componentDir + '.js'),
|
|
|
|
path.join(resolvedDir, componentDir, componentDir + '.js'),
|
|
|
|
path.join(resolvedDir, componentDir + '.js'),
|
|
|
|
path.join(resolvedDir, componentDir + '.js')
|
|
|
|
path.join(resolvedDir, componentDir)
|
|
|
|
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
for(const path of pathsToCheck)
|
|
|
|
for(const path of pathsToCheck)
|
|
|
|