src/importer.js
function getImportAbsolutePath(url, prev, includedFilesMap, includedPaths = []) {
  // Ensure that both @import 'file' and @import 'file.scss' is mapped correctly
  let extension = path.posix.extname(prev);
  if(path.posix.extname(url) !== extension) {
    url += extension;
  }

  const absolutePath = findImportedPath(url, prev, includedFilesMap, includedPaths);

  if(!absolutePath) {
    throw new Error(`Can not determine imported file for url '${url}' imported in ${prev}`);
  }

  return absolutePath;
}
function getImportAbsolutePath(url, prev, includedFilesMap, includedPaths = []) {
  // Ensure that both @import 'file' and @import 'file.scss' is mapped correctly
  let extension = path.posix.extname(prev);
  if(path.posix.extname(url) !== extension) {
    url += extension;
  }

  const absolutePath = findImportedPath(url, prev, includedFilesMap, includedPaths);

  if(!absolutePath) {
    throw new Error(`Can not determine imported file for url '${url}' imported in ${prev}`);
  }

  return absolutePath;
}
function getImportAbsolutePath ( url , prev , includedFilesMap , includedPaths = [ ] ) { // Ensure that both @import 'file' and @import 'file.scss' is mapped correctly let extension = path . posix . extname ( prev ) ; if ( path . posix . extname ( url ) !== extension ) { url += extension ; } const absolutePath = findImportedPath ( url , prev , includedFilesMap , includedPaths ) ; if ( ! absolutePath ) { throw new Error ( ` ${ url } ${ prev } ` ) ; } return absolutePath ; }
Get the absolute file path for a relative @import like './sub/file.scsss'
If the @import is made from a raw data section a best guess path is returned
Get the absolute file path for a relative