Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
benholloway committed Dec 9, 2015
2 parents 023749a + 931b105 commit c195da9
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,20 @@ function resolveUrlLoader(content, sourceMap) {
/* jshint validthis:true */

// details of the file being processed
// we would normally use compilation.getPath(options.output.path) to get the most correct outputPath,
// however we need to match to the sass-loader and it does not do so
var loader = this,
filePath = loader.context,
outputPath = loader.options.output.path,
options = defaults(loaderUtils.parseQuery(loader.query), loader.options[camelcase(PACKAGE_NAME)], {
absolute : false,
sourceMap: false,
fail : false,
silent : false,
root : null
});
outputPath = path.resolve(loader.options.output.path);

// prefer loader query, else options object, else default values
var options = defaults(loaderUtils.parseQuery(loader.query), loader.options[camelcase(PACKAGE_NAME)], {
absolute : false,
sourceMap: false,
fail : false,
silent : false,
root : null
});

// validate root directory
var resolvedRoot = (typeof options.root === 'string') && path.resolve(options.root),
Expand Down

0 comments on commit c195da9

Please sign in to comment.