Skip to content
Cloudflare Docs

Configuration and Bindings

Configuring a Worker with assets requires specifying a directory and, optionally, an assets binding, in your Worker's Wrangler file. The assets binding allows you to dynamically fetch assets from within your Worker script (e.g. env.ASSETS.fetch()), similarly to how you might with a make a fetch() call with a Service binding.

Only one collection of static assets can be configured in each Worker.

directory

The folder of static assets to be served. For many frameworks, this is the ./public/, ./dist/, or ./build/ folder.