Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Conversation

@TheLarkInn
Copy link
Contributor

This PR updates uglifyjs-webpack-plugin to use .tap() and .tapAsync() isntaed of .plugin() and use the new Tapable API in webpack@webpack/webpack#next.

Looks like prettier did some auto updating etc.

@TheLarkInn TheLarkInn requested a review from joshwiens December 27, 2017 01:02
@michael-ciniawsky michael-ciniawsky changed the title feat(tapable): upgrade .plugin to .tap refactor(index): upgrade compiler.plugin to the new plugin system (tapable) Dec 27, 2017
"ci:coverage": "npm run test:coverage -- --runInBand",
"defaults": "webpack-defaults"
"defaults": "webpack-defaults",
"webpack-defaults": "webpack-defaults"
Copy link
Member

Choose a reason for hiding this comment

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

-   "webpack-defaults": "webpack-defaults"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm how the hell did that end up in there? lol

Copy link
Member

Choose a reason for hiding this comment

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

It's a left over from the webpack-defaults v1.6.0...2.0.0 upgrade one needs to be aware of, unrelated to this PR entirely. I just saw/catched it here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do I need to make a change for this? Or is PR good as is?

const requestShortener = new RequestShortener(compiler.context);

compiler.plugin('compilation', (compilation) => {
compiler.hooks.compilation.tap('UglifyJsWebpackPlugin', (compilation) => {
Copy link
Member

Choose a reason for hiding this comment

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

Is UglifyJsWebpackPlugin accessible as a hook or is this just the plugin name for e.g interception ? UglifyJsPlugin ? What's the naming convention here ? :)

Copy link
Member

Choose a reason for hiding this comment

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

@michael-ciniawsky - Check the tapable changes for 4.x. This is something you are going to see a lot of on the contrib side for Webpack 4

Copy link
Member

Choose a reason for hiding this comment

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

Yep, that's why I'm asking :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the plugin name! :-D

@michael-ciniawsky
Copy link
Member

If there aren't any objections, this should be ready to land on next I think (worked 💯 in #200 so far). Would be a good idea to release an v2.0.0-alpha in the next few days I assume, so the internet can debug (eventual) remaining bugs while webpack v4.0.0 is on the finishing line :)

@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Jan 4, 2018

ℹ️ Tests are failing because of outdated test helpers and are fixed in #200

@michael-ciniawsky michael-ciniawsky merged commit 44f7375 into next Jan 5, 2018
@michael-ciniawsky michael-ciniawsky deleted the feature/update-to-tap branch February 16, 2018 22:23
@michael-ciniawsky michael-ciniawsky removed this from the 2.0.0 milestone Aug 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants