cloudflare · Cloudflare Workers Docs
Workers Static Assets
Explains how the Cloudflare Workers Vite plugin automatically handles static assets, including configuration requirements, automatic directory detection, and implementing single-page application fallback routing.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Static Assets
Explains how the Cloudflare Workers Vite plugin automatically handles static assets, including configuration requirements, automatic directory detection, and implementing single-page application fallback routing.
When To Use
Use when configuring a Cloudflare Worker with Vite to automatically manage static asset builds, set up SPA routing fallbacks, or access assets via bindings in a client environment.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-vite-plugin-static-assets-workflow-guide.md | Documentation detailing the configuration, features, and header management for using static assets with the Cloudflare Workers Vite plugin. | Questions about documentation detailing the configuration, features, and header management for using static assets with the Cloudflar... |
examples/workers-vite-plugin-static-assets-cloudflare-workers-vite-plugin-static-.text | A configuration object demonstrating the assets property settings for the Cloudflare Workers Vite plugin, including single-page application notfoundhandling. | Exact payloads, commands, or snippets shown in A configuration object demonstrating the assets property settings for the Cloudflare Workers Vite plugin, including s... |
examples/workers-vite-plugin-static-assets-cloudflare-workers-vite-plugin-static--2.text | A configuration example for the Cloudflare Workers Vite plugin demonstrating the [assets] block and single-page application notfoundhandling setting. | Exact payloads, commands, or snippets shown in A configuration example for the Cloudflare Workers Vite plugin demonstrating the [assets] block and single-page appli... |
examples/workers-vite-plugin-static-assets-cloudflare-workers-vite-plugin-static--3.text | A JavaScript code example demonstrating how to import and fetch static assets using the Cloudflare Workers Vite plugin. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to import and fetch static assets using the Cloudflare Workers Vite plugin. |
What This Skill Covers
- This guide focuses on the areas of working with static assets that are unique to the Vite plugin. For more general documentation, see Static Assets.
- Main sections:
Configuration,Features,Headers and redirects.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/vite-plugin/reference/static-assets
