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(cacheDir): Add ability to cache optimized images #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OlenDavis
Copy link

@OlenDavis
Copy link
Author

cc @anncwb for vis/review

@@ -30,14 +31,21 @@ export default function (options: VitePluginImageMin = {}) {
let publicDir: string
let config: ResolvedConfig

const { disable = false, filter = extRE, verbose = true } = options
const { disable = false, filter = extRE, verbose = true, cacheDir } = options

Choose a reason for hiding this comment

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

It would be nice if you set a default value for cacheDir.

Copy link

Choose a reason for hiding this comment

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

I think if a user does not provide a value for cacheDir, it might imply they do not wish to use the caching feature. Therefore, it might be better not to set a default value in this case to avoid unintentional use of caching.

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.

3 participants