Skip to content

Self-host heic2any and svgo to eliminate CDN dependencies#28

Merged
alekslinde merged 1 commit into
mainfrom
chore/self-host-cdn-deps
Jun 11, 2026
Merged

Self-host heic2any and svgo to eliminate CDN dependencies#28
alekslinde merged 1 commit into
mainfrom
chore/self-host-cdn-deps

Conversation

@alekslinde

Copy link
Copy Markdown
Owner

Removes runtime fetches to cdn.jsdelivr.net so all tools work on networks that block third-party CDNs (corporate firewalls, air-gapped).

  • heic2any: copy UMD bundle to public/ via postinstall; load from /heic2any.min.js
  • svgo: replaced window.svgo global injection with dynamic import('svgo/browser') so Vite manages bundling, caching, and lazy chunk splitting
  • Fix loadHeic2any() race: use a cached in-flight promise instead of a boolean flag so concurrent callers share one <script> injection
  • postinstall script keeps public/heic2any.min.js in sync with the installed version

Removes runtime fetches to cdn.jsdelivr.net so all tools work on
networks that block third-party CDNs (corporate firewalls, air-gapped).

- heic2any: copy UMD bundle to public/ via postinstall; load from /heic2any.min.js
- svgo: replaced window.svgo global injection with dynamic import('svgo/browser')
  so Vite manages bundling, caching, and lazy chunk splitting
- Fix loadHeic2any() race: use a cached in-flight promise instead of a boolean
  flag so concurrent callers share one <script> injection
- postinstall script keeps public/heic2any.min.js in sync with the installed version
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
lindetoolbox b8ffa5c Jun 11 2026, 01:10 PM

@alekslinde alekslinde merged commit 3b9138f into main Jun 11, 2026
1 of 2 checks passed
@alekslinde alekslinde deleted the chore/self-host-cdn-deps branch June 11, 2026 13:10
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.

1 participant