Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit a30f819

Browse files
author
Kirill Mesnyankin
committed
Merge branch 'fix/dependecy-bug'
2 parents 841670f + c51fff0 commit a30f819

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ module.exports = function (content) {
122122
resolvedFilename = self.resolveSync(dirContext, importToResolve);
123123
// Add the resolvedFilename as dependency. Although we're also using stats.includedFiles, this might come
124124
// in handy when an error occurs. In this case, we don't get stats.includedFiles from node-sass.
125-
self.dependency(resolvedFilename);
125+
addNormalizedDependency(resolvedFilename);
126126
// By removing the CSS file extension, we trigger node-sass to include the CSS file instead of just linking it.
127127
resolvedFilename = resolvedFilename.replace(matchCss, '');
128128
return {
@@ -160,7 +160,7 @@ module.exports = function (content) {
160160
}
161161
// Add the resolvedFilename as dependency. Although we're also using stats.includedFiles, this might come
162162
// in handy when an error occurs. In this case, we don't get stats.includedFiles from node-sass.
163-
self.dependency(resolvedFilename);
163+
addNormalizedDependency(resolvedFilename);
164164
// By removing the CSS file extension, we trigger node-sass to include the CSS file instead of just linking it.
165165
resolvedFilename = resolvedFilename.replace(matchCss, '');
166166

@@ -237,15 +237,15 @@ module.exports = function (content) {
237237
return result.css.toString();
238238
} catch (err) {
239239
formatSassError(err);
240-
err.file && this.dependency(err.file);
240+
err.file && addNormalizedDependency(err.file);
241241
throw err;
242242
}
243243
}
244244

245245
asyncSassJobQueue.push(opt, function onRender(err, result) {
246246
if (err) {
247247
formatSassError(err);
248-
err.file && self.dependency(err.file);
248+
err.file && addNormalizedDependency(err.file);
249249
callback(err);
250250
return;
251251
}

0 commit comments

Comments
 (0)