mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
In Stylus resolve relative paths with path.join
This commit is contained in:
@@ -63,9 +63,15 @@ class StylusCompiler extends MultiFileCachingCompiler {
|
||||
|
||||
// relative path in the same package
|
||||
const parsedImporter = parseImportPath(importerPath, null);
|
||||
|
||||
// resolve path if it is absolute or relative
|
||||
const importPath =
|
||||
(filePath[0] === '/') ? filePath :
|
||||
path.join(path.dirname(parsedImporter.pathInPackage), filePath);
|
||||
|
||||
return {
|
||||
packageName: parsedImporter.packageName,
|
||||
pathInPackage: path.resolve(parsedImporter.pathInPackage, filePath)
|
||||
pathInPackage: importPath
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user