ImportCache constructor
ImportCache({})
Creates an import cache that resolves imports using importers.
Imports are resolved by trying, in order:
-
Each importer in
importers. -
Each load path in
loadPaths. Note that this is a shorthand for adding FilesystemImporters toimporters. -
Each load path specified in the
SASS_PATHenvironment variable, which should be semicolon-separated on Windows and colon-separated elsewhere. -
package:resolution usingpackageConfig, which is aPackageConfigfrom thepackage_configpackage. Note that this is a shorthand for adding a PackageImporter toimporters.
Implementation
ImportCache(
{Iterable<Importer>? importers,
Iterable<String>? loadPaths,
PackageConfig? packageConfig,
Logger? logger})
: _importers = _toImporters(importers, loadPaths, packageConfig),
_logger = logger ?? Logger.stderr();