You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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.
267
270
// 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:
@@ -271,18 +274,31 @@ function getPossibleRequests(
271
274
// - imports that have media queries.
272
275
//
273
276
// The `node-sass` package sends `@import` ending on `.css` to importer, it is bug, so we skip resolve
// We only have one difference with the built-in sass resolution logic and out resolution logic:
378
+
// First, we look at the files starting with `_`, then without `_` (i.e. `_name.sass`, `_name.scss`, `_name.css`, `name.sass`, `name.scss`, `name.css`),
379
+
// although `sass` look together by extensions (i.e. `_name.sass`/`name.sass`/`_name.scss`/`name.scss`/`_name.css`/`name.css`).
380
+
// It shouldn't be a problem because `sass` throw errors:
381
+
// - on having `_name.sass` and `name.sass` (extension can be `sass`, `scss` or `css`) in the same directory
382
+
// - on having `_name.sass` and `_name.scss` in the same directory
383
+
//
384
+
// Also `sass` prefer `sass`/`scss` over `css`.
361
385
constsassModuleResolve=promiseResolve(
362
386
resolverFactory({
363
387
alias: [],
@@ -455,7 +479,11 @@ function getWebpackResolver(
455
479
// 5. Filesystem imports relative to a `SASS_PATH` path.
456
480
//
457
481
// `sass` run custom importers before `3`, `4` and `5` points, we need to emulate this behavior to avoid wrong resolution.
0 commit comments