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

Build cache #19

Closed
kettanaito opened this issue Aug 25, 2024 · 2 comments · Fixed by #21
Closed

Build cache #19

kettanaito opened this issue Aug 25, 2024 · 2 comments · Fixed by #21

Comments

@kettanaito
Copy link
Owner

kettanaito commented Aug 25, 2024

There are two outcomes of this task:

  1. Research how to enable and use build caching to skip image generation.
  2. Document how to set up caching in README.

Cloudflare

  • Use Build Caching (has to be enabled explicitly). Supports some major frameworks but not Remix.

If Remix was supported, enabling Build Caching would theoretically be enough to cache the generated images, but now you get this:

Skipping build output cache as it's not supported for your project

Vercel

  • Use Build caching. I don't seen an explicit mention of Remix build cache path, but Vercel caches everything in node_modules across builds. The plugin can utilize that.
@kettanaito
Copy link
Owner Author

Right now, the local cache is broken because the plugin checks if an image exist at the cached path, and it will never exist since Vite clears the build/client directory before each build.

How to solve this

The plugin should output the images to the cache directory so if there's a cache match, it will simply copy them from cache to build/client without having to spawn browser tabs.

@kettanaito
Copy link
Owner Author

Released: v0.3.5 🎉

This has been released in v0.3.5!

Make sure to always update to the latest version (npm i remix-og-image@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant