Skip to content

Commit 7380b7b

Browse files
fix: resolution logic (#838)
1 parent 0c8d3b3 commit 7380b7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/getSassOptions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ function getSassOptions(loaderContext, loaderOptions, content, implementation) {
5757
delete options.fiber;
5858
}
5959

60+
options.file = loaderContext.resourcePath;
6061
options.data = loaderOptions.prependData
6162
? typeof loaderOptions.prependData === 'function'
6263
? `${loaderOptions.prependData(loaderContext)}\n${content}`
@@ -107,14 +108,13 @@ function getSassOptions(loaderContext, loaderOptions, content, implementation) {
107108
: [];
108109

109110
options.includePaths = []
111+
.concat(process.cwd())
110112
.concat(options.includePaths || [])
111113
.concat(
112114
process.env.SASS_PATH
113115
? process.env.SASS_PATH.split(process.platform === 'win32' ? ';' : ':')
114116
: []
115-
)
116-
.concat(process.cwd())
117-
.concat(path.dirname(resourcePath));
117+
);
118118

119119
return options;
120120
}

0 commit comments

Comments
 (0)