Skip to content

Commit

Permalink
fix: resolution logic (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Apr 20, 2020
1 parent 0c8d3b3 commit 7380b7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/getSassOptions.js
Expand Up @@ -57,6 +57,7 @@ function getSassOptions(loaderContext, loaderOptions, content, implementation) {
delete options.fiber;
}

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

options.includePaths = []
.concat(process.cwd())
.concat(options.includePaths || [])
.concat(
process.env.SASS_PATH
? process.env.SASS_PATH.split(process.platform === 'win32' ? ';' : ':')
: []
)
.concat(process.cwd())
.concat(path.dirname(resourcePath));
);

return options;
}
Expand Down

0 comments on commit 7380b7b

Please sign in to comment.