Skip to content

Commit d3ef855

Browse files
committed
Fix #167
1 parent b06b6be commit d3ef855

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,14 @@ function getImportsToResolve(originalImport) {
342342
return [originalImport];
343343
}
344344
}
345-
if (ext) {
346-
if (ext === '.scss' || ext === '.sass') {
347-
add(basename);
348-
}/* else {
349-
Leave unknown extensions (like .css) untouched
350-
}*/
345+
346+
// We can't just check for ext being defined because ext can also be something like '.datepicker'
347+
// when the true extension is omitted and the filename contains a dot.
348+
// @see https://github.com/jtangelder/sass-loader/issues/167
349+
if (ext === '.css') {
350+
// do not import css files
351+
} else if (ext === '.scss' || ext === '.sass') {
352+
add(basename);
351353
} else {
352354
if (!startsWithUnderscore) {
353355
// Prefer modules starting with '_' first

0 commit comments

Comments
 (0)