Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible fix for #79 #80

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ function resolveUrlLoader(content, sourceMap) {

// webpack 1: prefer loader query, else options object
// webpack 2; prefer loader options
var options = defaults(loaderUtils.getOptions(loader), loader.options[camelcase(PACKAGE_NAME)], {
var options = defaults(
loaderUtils.getOptions(loader),
loader.options && loader.options[camelcase(PACKAGE_NAME)],
loader.query, {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acoll It seems to me that loader.query is redundant given that loaderUtils.getOptions(loader) incorporates it here.

absolute : false,
sourceMap : loader.sourceMap,
fail : false,
Expand Down