LegacyImporterResult

LegacyImporterResult: {
    file: string;
} | {
    contents: string;
} | Error | null

執行 LegacyImporter 的結果。它必須是下列類型之一

  • 一個包含鍵 contents 的物件,其值是樣式表的內容(使用 SCSS 語法)。這會導致 Sass 載入該樣式表的內容。

  • 一個包含鍵 file 的物件,其值是磁碟上的路徑。這會導致 Sass 載入該檔案,如同它已被直接匯入一樣。

  • null,表示它無法辨識該網址,應該嘗試使用其他匯入器。

  • 一個 Error 物件,表示匯入失敗。

已棄用

這僅適用於舊版 renderrenderSync API。請改用 ImporterResult 搭配 compilecompileStringcompileAsynccompileStringAsync