Skip to content

Commit 9914870

Browse files
authored
fix: missing sass embedded check when get default implementation (#1170)
1 parent a2565f8 commit 9914870

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/utils.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ function getDefaultSassImplementation() {
1111

1212
try {
1313
require.resolve("sass");
14-
} catch (error) {
14+
} catch (ignoreError) {
1515
try {
1616
require.resolve("node-sass");
1717
sassImplPkg = "node-sass";
18-
} catch (ignoreError) {
19-
sassImplPkg = "sass";
18+
} catch (_ignoreError) {
19+
try {
20+
require.resolve("sass-embedded");
21+
sassImplPkg = "sass-embedded";
22+
} catch (__ignoreError) {
23+
sassImplPkg = "sass";
24+
}
2025
}
2126
}
2227

0 commit comments

Comments
 (0)