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

refactor(karma-webpack): remove compiler legacy code (compiler.plugin) #342

Merged
merged 1 commit into from
Sep 1, 2018
Merged

refactor(karma-webpack): remove compiler legacy code (compiler.plugin) #342

merged 1 commit into from
Sep 1, 2018

Conversation

ryanclark
Copy link
Collaborator

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Remove legacy compiler hook code for webpack < v4.0.0 compatibility.

Does this PR introduce a breaking change?

  • Yes
  • No

@@ -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=${
Copy link
Collaborator Author

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..

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@michael-ciniawsky michael-ciniawsky changed the title refactor(karma-webpack): remove legacy compiler hook code refactor(karma-webpack): remove compiler legacy code (compiler.plugin) Sep 1, 2018
});
compiler.plugin('make', this.make.bind(this));
}
compiler.hooks.thisCompilation.tap(this.plugin, (compilation, params) => {
Copy link
Contributor

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 :)

@michael-ciniawsky michael-ciniawsky added this to the 4.0.0 milestone Sep 1, 2018
@michael-ciniawsky michael-ciniawsky merged commit e68abc3 into codymikol:next Sep 1, 2018
@michael-ciniawsky michael-ciniawsky changed the title refactor(karma-webpack): remove compiler legacy code (compiler.plugin) refactor(karma-webpack): remove compiler legacy code (compiler.plugin) Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants