-
Notifications
You must be signed in to change notification settings - Fork 220
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
refactor(karma-webpack): remove compiler
legacy code (compiler.plugin
)
#342
Conversation
@@ -270,7 +233,9 @@ Plugin.prototype.make = function(compilation, callback) { | |||
let entry = file; | |||
|
|||
if (this.wrapMocha) { | |||
entry = `${require.resolve('./mocha-env-loader')}?name=${compilation.name}!${entry}`; | |||
entry = `${require.resolve('./mocha-env-loader')}?name=${ |
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.
Seems prettier wanted to change this line on this commit for some reason..
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.
👍
compiler.plugin
)
}); | ||
compiler.plugin('make', this.make.bind(this)); | ||
} | ||
compiler.hooks.thisCompilation.tap(this.plugin, (compilation, params) => { |
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.
Could you try with using compilation
instead of thisCompilation
, the latter is an alias if I remember right and will be removed in a feature version of webpack
. But it's not important to do this now, I just saw it, so in case it bugs for whatever reason don't bother :)
compiler.plugin
)compiler
legacy code (compiler.plugin
)
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior?
Remove legacy compiler hook code for
webpack < v4.0.0
compatibility.Does this PR introduce a breaking change?