From 78b6a092f8c7fc995acbf2b3dcbe18ece184e4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Tue, 5 Sep 2023 09:11:16 -0700 Subject: [PATCH] Prepare importer shim for dart-sass 1.67.0 - https://github.com/sass/dart-sass/pull/2077 --- lib/sassc/embedded.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sassc/embedded.rb b/lib/sassc/embedded.rb index d2d8195..a086276 100644 --- a/lib/sassc/embedded.rb +++ b/lib/sassc/embedded.rb @@ -13,9 +13,11 @@ class Engine def render return @template.dup if @template.empty? + base_importer = import_handler.setup(nil) + result = ::Sass.compile_string( @template, - importer: import_handler.setup(nil), + importer: base_importer, load_paths: load_paths, syntax: syntax, url: file_url, @@ -26,7 +28,7 @@ def render style: output_style, functions: functions_handler.setup(nil, functions: @functions), - importers: @options.fetch(:importers, []), + importers: (base_importer ? [base_importer] : []).concat(@options.fetch(:importers, [])), alert_ascii: @options.fetch(:alert_ascii, false), alert_color: @options.fetch(:alert_color, nil),