diff --git a/components/errorBoundary/errorBoundary.js b/components/errorBoundary.js similarity index 100% rename from components/errorBoundary/errorBoundary.js rename to components/errorBoundary.js diff --git a/components/errorDisplay/errorDisplay.js b/components/errorDisplay.js similarity index 100% rename from components/errorDisplay/errorDisplay.js rename to components/errorDisplay.js diff --git a/next.config.js b/next.config.js index b4eb0ef..904aff2 100644 --- a/next.config.js +++ b/next.config.js @@ -35,12 +35,13 @@ class CustomResolver { const resolvedDir = 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 = [ path.join(resolvedDir, componentDir, componentDir + '.js'), - path.join(resolvedDir, componentDir + '.js'), - path.join(resolvedDir, componentDir) + path.join(resolvedDir, componentDir + '.js') ] for(const path of pathsToCheck)