LegacySyncImporter
Type declaration
-
- (this: LegacyImporterThis, url: string, prev: string): LegacyImporterResult
-
Parameters
-
this: LegacyImporterThis
-
url: string
The
@useor@importrule’s URL as a string, exactly as it appears in the stylesheet. -
prev: string
A string identifying the stylesheet that contained the
@useor@import. This string’s format depends on how that stylesheet was loaded:- If the stylesheet was loaded from the filesystem, it’s the absolute path of its file.
- If the stylesheet was loaded from an importer that returned its contents,
it’s the URL of the
@useor@importrule that loaded it. - If the stylesheet came from the data option, it’s the string "stdin".
Returns LegacyImporterResult
-
A synchronous callback that implements custom Sass loading logic for
@importrules and@userules. This can be passed to importer for either render or renderSync.See importer for more detailed documentation.
Deprecated
This only works with the legacy render and renderSync APIs. Use Importer with compile, compileString, compileAsync, and compileStringAsync instead.