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

doc: webpack v4 needs terser v4 #378

Merged
merged 3 commits into from
Jan 15, 2021

Conversation

rap2hpoutre
Copy link
Contributor

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update
  • A doc improvement

Motivation / Use-Case

Many peoples seems upset because they failed to install this lib with webpack 4: #335 (comment). Since "Webpack v5 comes with the latest terser-webpack-plugin out of the box", the only users that want to install it manually would be the one that use v4. I guess people would be more happy with this hint.

Scenario: I did not know terser and had to improve a webpack (v4) config file. I read that I have to replace uglify plugin which is not maintained with terser. So I went to this repo and copy/pasted the install line as stated in the readme. It failed.

Feel free to ask me anything, I would be super happy to improve my PR!

@codecov
Copy link

codecov bot commented Jan 15, 2021

Codecov Report

Merging #378 (3b57de6) into master (4320006) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #378   +/-   ##
=======================================
  Coverage   96.98%   96.98%           
=======================================
  Files           3        3           
  Lines         299      299           
  Branches      128      128           
=======================================
  Hits          290      290           
  Misses          8        8           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4320006...3b57de6. Read the comment docs.

@@ -20,10 +20,10 @@ This plugin uses [terser](https://github.com/terser-js/terser) to minify your Ja

If you are using webpack v5 or above you do not need to install this plugin. Webpack v5 comes with the latest `terser-webpack-plugin` out of the box.

Copy link
Member

Choose a reason for hiding this comment

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

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

Thank you for your answer. Do you mean I have to (1) additionally describe it here OR (2) remove what I suggested and add it there only?

Suggestion:

If you are using webpack v5 or above you do not need to install this plugin. Webpack v5 comes with the latest terser-webpack-plugin out of the box. Using Webpack v4, you have to install terser-webpack-plugin v4.

Copy link
Member

@alexander-akait alexander-akait Jan 15, 2021

Choose a reason for hiding this comment

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

No need to change original setup, let's describe separately about webpack@4, anyway I strongly recommend to migrate on v5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexander-akait I just removed my original suggestion and tried to follow your advice. Let me know if it's OK!

Copy link
Member

Choose a reason for hiding this comment

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

All is OK 👍

@alexander-akait
Copy link
Member

Can you accept CLA?

@rap2hpoutre
Copy link
Contributor Author

Done!

@alexander-akait
Copy link
Member

Sometimes bot is buggy, don't worry

@alexander-akait alexander-akait merged commit 727ee60 into webpack-contrib:master Jan 15, 2021
@alexander-akait
Copy link
Member

Thanks

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 this pull request may close these issues.

2 participants