Skip to content

Commit

Permalink
support dart-sass
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Jan 23, 2019
1 parent 092f74e commit 2ad5ae1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sass-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default {
test: /\.s[ac]ss$/,
process({ code }) {
return new Promise((resolve, reject) => {
const sass = importCwd('node-sass')
const sass = importCwd.silent('node-sass') || importCwd.silent('sass')
if (!sass) {
throw new Error(`You need to install either node-sass or sass in order to process Sass files`)
}
const render = pify(sass.render.bind(sass))
return workQueue.add(() =>
render({
Expand Down

0 comments on commit 2ad5ae1

Please sign in to comment.