From 6ccaf6db73b0d800d3db7fbbab2555f5b1f8c526 Mon Sep 17 00:00:00 2001 From: taugocauci Date: Sun, 1 Jul 2018 01:33:59 +0800 Subject: [PATCH] Fix Sass dependencies can not be watched when includePaths is a relative path (#1619) --- src/assets/SASSAsset.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/assets/SASSAsset.js b/src/assets/SASSAsset.js index d92c68d7ffd..f370a7bdafe 100644 --- a/src/assets/SASSAsset.js +++ b/src/assets/SASSAsset.js @@ -24,9 +24,10 @@ class SASSAsset extends Asset { let opts = (await this.getConfig(['.sassrc', '.sassrc.js'], {packageKey: 'sass'})) || {}; - opts.includePaths = (opts.includePaths || []).concat( - path.dirname(this.name) - ); + opts.includePaths = (opts.includePaths + ? opts.includePaths.map(includePath => path.resolve(includePath)) + : [] + ).concat(path.dirname(this.name)); opts.data = opts.data ? opts.data + os.EOL + code : code; let type = this.options.rendition ? this.options.rendition.type