-
-
Notifications
You must be signed in to change notification settings - Fork 200
Replace "resolve_url_loader" by "resolveUrlLoader" #159
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
Replace "resolve_url_loader" by "resolveUrlLoader" #159
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just awesome. I really wanted to start the habit/system of deprecating things when possible, even though we are before 1.0. And you were obviously thinking the exact same thing. Nice work! One tiny comment, which I think you'll like. Then we're ready!
lib/WebpackConfig.js
Outdated
throw new Error(`Invalid option "${optionKey}" passed to enableSassLoader(). Valid keys are ${Object.keys(this.sassOptions).join(', ')}`); | ||
let normalizedOptionKey = optionKey; | ||
if (optionKey === 'resolve_url_loader') { | ||
logger.warning('enableSassLoader: "resolve_url_loader" is deprecated. Please use "resolveUrlLoader" instead.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a new logger.deprecation
method? It will probably look the same, but can be a nice, standard way to start doing this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
77d6f42
to
ff442a6
Compare
resolve_url_loader: true | ||
resolveUrlLoader: true | ||
}; | ||
this.preactOptions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thank you @Lyrkan! |
This PR was squashed before being merged into the master branch (closes #159). Discussion ---------- Replace "resolve_url_loader" by "resolveUrlLoader" This PR deprecates the `resolve_url_loader` option used by the `enableSassLoader` and replaces it by `resolveUrlLoader`. This is done to be consistent with other methods that use camel-case instead of snake-case (see [#152](#152 (comment))). `resolve_url_loader` will still work for now but will display the following deprecation message:  Commits ------- ff442a6 Add a logger.deprecation(message) method 9dac153 Replace sass option 'resolve_url_loader' by 'resolveUrlLoader'
This PR deprecates the
resolve_url_loader
option used by theenableSassLoader
and replaces it byresolveUrlLoader
.This is done to be consistent with other methods that use camel-case instead of snake-case (see #152).
resolve_url_loader
will still work for now but will display the following deprecation message: