Skip to content

Commit 2ad5ae1

Browse files
committed
support dart-sass
1 parent 092f74e commit 2ad5ae1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/sass-loader.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export default {
2323
test: /\.s[ac]ss$/,
2424
process({ code }) {
2525
return new Promise((resolve, reject) => {
26-
const sass = importCwd('node-sass')
26+
const sass = importCwd.silent('node-sass') || importCwd.silent('sass')
27+
if (!sass) {
28+
throw new Error(`You need to install either node-sass or sass in order to process Sass files`)
29+
}
2730
const render = pify(sass.render.bind(sass))
2831
return workQueue.add(() =>
2932
render({

0 commit comments

Comments
 (0)