-
Notifications
You must be signed in to change notification settings - Fork 39
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
fix compatibility issue with webpack 4 #62
Conversation
`this.option.context` has been deprecated since webpack 3, it's been replaced by `this.rootContext` in webpack 4.
Please look into merging this :) |
also interested on this. |
index.js
Outdated
@@ -73,7 +73,7 @@ module.exports = function (source) { | |||
hasRun = true; | |||
} | |||
|
|||
var name = slash(path.relative(root || this.options.context, this.resourcePath)); | |||
var name = slash(path.relative(root || this.rootContext, this.resourcePath)); |
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.
Thanks, can keep this.options.context
for backwards compatability please.
slash(path.relative(root || this.rootContext || this.options.context, this.resourcePath));
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.
+1 smart
@at0g done! |
merge this maybe? |
@at0g can we also get a npm release please? |
this.option.context
has been deprecated since webpack 3, it's beenreplaced by
this.rootContext
in webpack 4.I haven't tested everything, this is just a really quick fix I did to make my webpack 4 compile.
I also don't know if this fix is backwards compatible.
however, this was the only instance of
this.options.context
in the code, so I doubt it will break anything.See #61