Skip to content

Add resource-fallback — zero-intrusion asset fallback plugin#1121

Open
ben-lau wants to merge 2 commits into
vitejs:masterfrom
ben-lau:master
Open

Add resource-fallback — zero-intrusion asset fallback plugin#1121
ben-lau wants to merge 2 commits into
vitejs:masterfrom
ben-lau:master

Conversation

@ben-lau

@ben-lau ben-lau commented Jun 15, 2026

Copy link
Copy Markdown

Summary

Adds resource-fallback — a runtime resource fallback solution for frontend build outputs (Vite & Webpack).

What it does

When a CDN or static asset URL fails at runtime, resource-fallback automatically:

retry → switch to backup CDN → fall back to origin

…without requiring changes to application code. Works with sync/async JS, CSS chunks, React.lazy, Vue defineAsyncComponent, Vue Router lazy routes, and more.

Why it fits this list

How it differs from similar tools

This is not a build-time CDN import plugin (e.g. swapping React/Vue to a CDN at compile time).

It targets a different problem: your own build artifacts (entry bundles, async chunks, CSS) failing to load in the browser due to CDN/network issues — with a unified retry + multi-source fallback strategy.

Compared to Webpack-only retry plugins, it also covers Vite, DOM <script>/<link> error handling, optional Hybrid Service Worker for images/fonts/CSS url(), per-host circuit breaker, kill switches, and CSP/SRI compatibility.

Links

README change

See diff — one line under [CATEGORY].

ben-lau added 2 commits June 15, 2026 19:44
Updated resource-fallback link to point to the vite-plugin version.
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