Closed bodnarbm closed 3 years ago
@bolandrm, when you have a chance, I would love to know if this is something that you think should move forward in sassc-rails. Absolute path imports already work for files that don't require preprocessing by sassc-rails (LibSass already handles those ones), so this PR intends just to allow the same types of imports for files that do require preprocessing by sassc-rails.
@bolandrm, I would still very much be interested in having this and #137 reviewed for possible merge into master to resolve the issues noted in #123. Happy to work though any requested changes or to examine any alternative approaches.
If a processed file used an absolute path without an extension to import an asset that would normally require preprocessing via the sassc-rails gem (such as assets using ERB templates or
.css.s[a|c]ss
files, these files would fail to process with a file not found error.This change checks if the directory part of the import path is a valid directory. If so, that directory is added to the list of paths to search for files with extensions requiring preprocessing, and preprocesses those files before handing them off to the native sassc library.
Addresses #123 first issue