Skip to content

Commit df66b13

Browse files
committed
fix: Remove code branch that always returned false.
1 parent 598477f commit df66b13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/@css-blocks/core/src/importing/NodeJsImporter.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ export class NodeJsImporter implements Importer {
5555
// `from` or `rootDir`. If it exists, return.
5656
from = from ? this.filesystemPath(from, config) : from;
5757
let fromDir = from ? path.dirname(from) : config.rootDir;
58+
// TODO: this won't work on windows because the import path is using `/`
5859
let resolvedPath = path.resolve(fromDir, importPath);
5960
if (existsSync(resolvedPath)) { return resolvedPath; }
6061
debug(`No relative or absolute Block file discovered for ${importPath}.`);
6162

6263
// If not a real file, attempt to resolve to an aliased path instead, if present.
63-
let alias = this.aliases.find(a => importPath.startsWith(a.alias) || importPath.startsWith(a.alias + path.sep));
64+
let alias = this.aliases.find(a => importPath.startsWith(a.alias));
6465
if (alias) {
6566
importPath = path.join(alias.path, importPath.replace(alias.alias, ""));
6667
}

0 commit comments

Comments
 (0)