Skip to content

Commit

Permalink
fix: resolution algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Aug 4, 2020
1 parent c6d56e4 commit 4907496
Show file tree
Hide file tree
Showing 6 changed files with 1,600 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.js
Expand Up @@ -256,7 +256,7 @@ export default function getPossibleRequests(
return [
...new Set(
[`${dirname}/_${basename}`, request].concat(
forWebpackResolver ? [url] : []
forWebpackResolver ? [`${path.dirname(url)}/_${basename}`, url] : []
)
),
];
Expand Down Expand Up @@ -391,6 +391,10 @@ function getWebpackImporter(loaderContext, implementation, includePaths) {
possibleRequests: webpackPossibleRequests,
});

// console.log(originalUrl);
// console.log(needEmulateSassResolver);
// console.log(resolutionMap);

startResolving(resolutionMap)
// Catch all resolving errors, return the original file and pass responsibility back to other custom importers
.catch(() => ({ file: originalUrl }))
Expand Down

0 comments on commit 4907496

Please sign in to comment.