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

feat: add svgo implementation #369

Merged
merged 3 commits into from
Nov 1, 2022

Conversation

RAX7
Copy link
Contributor

@RAX7 RAX7 commented Oct 29, 2022

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

The imagemin lib is unmaintained for a year. This means that svgo will never be updated to the latest version. So I created an implementation independent of imagemin for svgo.
It's also useful for users using imagemin just to minify only svg files.

Additional Info

I have edited tsconfig to avoid svgo bug svg/svgo#1700
Now it has "skipLibCheck": true

@codecov
Copy link

codecov bot commented Oct 29, 2022

Codecov Report

Base: 75.69% // Head: 76.32% // Increases project coverage by +0.63% 🎉

Coverage data is based on head (f95b41a) compared to base (dc0a67a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #369      +/-   ##
==========================================
+ Coverage   75.69%   76.32%   +0.63%     
==========================================
  Files           4        4              
  Lines         683      697      +14     
  Branches      265      268       +3     
==========================================
+ Hits          517      532      +15     
+ Misses        137      136       -1     
  Partials       29       29              
Impacted Files Coverage Δ
src/index.js 95.62% <100.00%> (+0.02%) ⬆️
src/utils.js 59.78% <100.00%> (+1.43%) ⬆️
src/loader.js 97.08% <0.00%> (+0.97%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alexander-akait alexander-akait merged commit 0701188 into webpack-contrib:master Nov 1, 2022
@RAX7 RAX7 deleted the svgo-implementation branch November 1, 2022 13:10
@alexander-akait
Copy link
Member

@RAX7 Thank you.

If you intrested to improve perf in this plugin, we can implement multithreading here (I think it will improve perf very well), in other minimizer plugins (terser/css/etc) we implemented it using jest-worker, so we can just move this solution here (under the option) and improve perf, just idea

@RAX7
Copy link
Contributor Author

RAX7 commented Nov 1, 2022

@alexander-akait You are welcome!
I'll take a look at jest-worker and try to use it later.

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