Skip to content

Commit ea84790

Browse files
Fix Sass emitted error event on watch
1 parent 38e42d7 commit ea84790

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

gulpfile.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function cleanPublic() {
2424
const sass = gulpSass(dartSass)
2525

2626
// Compile SASS to CSS
27-
function compileStyles(done) {
27+
function compileStyles() {
2828
return gulp
2929
.src(['app/assets/sass/**/*.scss'], {
3030
sourcemaps: true
@@ -35,11 +35,9 @@ function compileStyles(done) {
3535
sourceMap: true,
3636
sourceMapIncludeSources: true
3737
}).on('error', (error) => {
38-
done(
39-
new PluginError('compileCSS', error.messageFormatted, {
40-
showProperties: false
41-
})
42-
)
38+
throw new PluginError('compileCSS', error.messageFormatted, {
39+
showProperties: false
40+
})
4341
})
4442
)
4543
.pipe(

0 commit comments

Comments
 (0)