FatehAK / vite-plugin-image-optimizer

Optimize your image assets using Sharp.js and SVGO.
MIT License
311 stars 15 forks source link

fix: Use root path when building full destination #32

Closed fidian closed 4 months ago

fidian commented 9 months ago

What is the purpose of this pull request?

Description

Previously this plugin would not do anything when you put your project's site files under a folder. See the root shared option. With this change, the user now can have source files in a folder that is not at the project root.

This may also fix FatehAK/vite-plugin-image-optimizer#30, since I am also using Vite 5.x.

Checks

Additional Context

jonasgeiler commented 4 months ago

I think this is a small but very useful change. Would be cool if you could merge this, @FatehAK! I can confirm that this works for my project.

For now I have made a fork which implements this PR at @jonasgeiler/vite-plugin-image-optimizer

FatehAK commented 4 months ago

Sure, @jonasgeiler! I'll make a release with this shortly. It's been a hectic few months at work, and I apologize for not getting to this sooner.

jonasgeiler commented 4 months ago

@FatehAK wrote: Sure, (at)jonasgeiler! I'll make a release with this shortly. It's been a hectic few months at work, and I apologize for not getting to this sooner.

Sure! No worries. I'll delete my fork as soon as #32 and #28 are merged :) Take your time.

FatehAK commented 4 months ago

Thanks for the support @fidian and @jonasgeiler this change is now available in v1.1.8.

jonasgeiler commented 4 months ago

@FatehAK wrote: Thanks for the support (at)fidian and (at)jonasgeiler this change is now available in v1.1.8.

Thank you! Fork is deleted now :)