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

Tapable.plugin is deprecated. Use new API on .hooks instead (au build / webpack 4.x ) #923

Closed
oising opened this issue Sep 27, 2018 · 0 comments · Fixed by #942
Closed

Comments

@oising
Copy link

oising commented Sep 27, 2018

The offending line is:

compiler.plugin('done', () => done());

Rewriting as:

function buildWebpack(done) {
  if (CLIOptions.hasFlag('watch')) {
    compiler.watch({}, onBuild);
  } else {
    compiler.run(onBuild);
    //compiler.plugin('done', () => done()); // Tapable.plugin is deprecated. Use new API on `.hooks` instead
    compiler.hooks.done.tap('done', () => done());
  }
}

This removes the deprecation warning. Sorry I can't offer a PR, but I know little about webpack internals or the aurelia-cli -- I just dug enough to fix this issue. Again, I think this only rears its ugly head with webpack 4.x

@oising oising changed the title Tapable.plugin is deprecated. Use new API on .hooks instead (webpack 4.x) Tapable.plugin is deprecated. Use new API on .hooks instead (au build / webpack 4.x ) Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant