File tree 1 file changed +2
-1
lines changed
packages/@css-blocks/core/src/importing
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,13 @@ export class NodeJsImporter implements Importer {
55
55
// `from` or `rootDir`. If it exists, return.
56
56
from = from ? this . filesystemPath ( from , config ) : from ;
57
57
let fromDir = from ? path . dirname ( from ) : config . rootDir ;
58
+ // TODO: this won't work on windows because the import path is using `/`
58
59
let resolvedPath = path . resolve ( fromDir , importPath ) ;
59
60
if ( existsSync ( resolvedPath ) ) { return resolvedPath ; }
60
61
debug ( `No relative or absolute Block file discovered for ${ importPath } .` ) ;
61
62
62
63
// 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 ) ) ;
64
65
if ( alias ) {
65
66
importPath = path . join ( alias . path , importPath . replace ( alias . alias , "" ) ) ;
66
67
}
You can’t perform that action at this time.
0 commit comments