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: percent resize unit #448

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

OlenDavis
Copy link
Contributor

@OlenDavis OlenDavis commented Jul 25, 2024

This PR contains a:

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

Motivation / Use-Case

For years I've had to use a custom image loader to allow me to generate non-retina resized images on the fly via webpack from retina-sized images in the source code. But since recently upgrading to webpack 5 and getting familiarized with its new capabilities and patterns (including your plugin here), your plugin's generator functionality seems to be the best place for that sort of functionality instead. So hopefully you agree that this PR adds the ability to do percentage-based resizing of generated images as minimally and idiomatically as I've tried to. But let me know if you have any concerns I might address in order to get this approved and merged. 🙇 🤝

Breaking Changes

no breaking changes

Additional Info

Copy link

linux-foundation-easycla bot commented Jul 25, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Great idea

@alexander-akait
Copy link
Member

I will fix lint problems (need update some deps before release)

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.74%. Comparing base (3a924e4) to head (55e2e2d).
Report is 11 commits behind head on master.

Files Patch % Lines
src/loader.js 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #448      +/-   ##
==========================================
+ Coverage   77.16%   77.74%   +0.58%     
==========================================
  Files           4        4              
  Lines         727      746      +19     
  Branches      282      296      +14     
==========================================
+ Hits          561      580      +19     
  Misses        137      137              
  Partials       29       29              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexander-akait alexander-akait merged commit a83f491 into webpack-contrib:master Jul 26, 2024
13 of 14 checks passed
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