function getPossibleRequests(
  // eslint-disable-next-line no-shadow
  url,
  forWebpackResolver = false,
  fromImport = false,
) {
  let request = url;

  // In case there is module request, send this to webpack resolver
  if (forWebpackResolver) {
    if (MODULE_REQUEST_REGEX.test(url)) {
      request = request.replace(MODULE_REQUEST_REGEX, "");
    }

    if (IS_PKG_SCHEME.test(url)) {
      request = `${request.slice(4)}`;

      return [...new Set([request, url])];
    }

    if (IS_MODULE_IMPORT.test(url) || IS_PKG_SCHEME.test(url)) {
      request = request[request.length - 1] === "/" ? request : `${request}/`;

      return [...new Set([request, url])];
    }
  }

  // Keep in mind: ext can also be something like '.datepicker' when the true extension is omitted and the filename contains a dot.
  // @see https://github.com/webpack-contrib/sass-loader/issues/167
  const extension = path.extname(request).toLowerCase();

  // Because @import is also defined in CSS, Sass needs a way of compiling plain CSS @imports without trying to import the files at compile time.
  // To accomplish this, and to ensure SCSS is as much of a superset of CSS as possible, Sass will compile any @imports with the following characteristics to plain CSS imports:
  //  - imports where the URL ends with .css.
  //  - imports where the URL begins http:// or https://.
  //  - imports where the URL is written as a url().
  //  - imports that have media queries.
  //
  // The `node-sass` package sends `@import` ending on `.css` to importer, it is bug, so we skip resolve
  // Also sass outputs as is `@import "style.css"`, but `@use "style.css"` should include CSS content
  if (extension === ".css") {
    return fromImport ? [] : [url];
  }

  const dirname = path.dirname(request);
  const normalizedDirname = dirname === "." ? "" : `${dirname}/`;
  const basename = path.basename(request);
  const basenameWithoutExtension = path.basename(request, extension);

  return [
    ...new Set(
      []
        .concat(
          fromImport
            ? [
                `${normalizedDirname}_${basenameWithoutExtension}.import${extension}`,
                `${normalizedDirname}${basenameWithoutExtension}.import${extension}`,
              ]
            : [],
        )
        .concat([
          `${normalizedDirname}_${basename}`,
          `${normalizedDirname}${basename}`,
        ])
        .concat(forWebpackResolver ? [url] : []),
    ),
  ];
}
When `sass`/`node-sass` tries to resolve an import, it uses a special algorithm.
Since the `sass-loader` uses webpack to resolve the modules, we need to simulate that algorithm.
This function returns an array of import paths to try.
The last entry in the array is always the original url to enable straight-forward webpack.config aliases.

We don't need emulate `dart-sass` "It's not clear which file to import." errors (when "file.ext" and "_file.ext" files are present simultaneously in the same directory).
This reduces performance and `dart-sass` always do it on own side.

@param {string} url
@param {boolean} forWebpackResolver
@param {boolean} fromImport
@returns {Array<string>}