From what I've understood, you can put a worker in front ( all requests uses the worker ) or without
From what I've understood, you can put a worker in front ( all requests uses the worker ) or without worker. All depend of how you setup your wrangler.toml ( « main = './src/index.js' » )
Then, you define in wrangler the folder of your static assets ( « assets = { directory = "./public/" } » )
But, unfortunately, I don't think there is a way to first try to return a static asset and then run the worker. There is a not_found_handler but only to set a SPA ( fallback to the /index.html ) or to set a 404 page
Then, you define in wrangler the folder of your static assets ( « assets = { directory = "./public/" } » )
But, unfortunately, I don't think there is a way to first try to return a static asset and then run the worker. There is a not_found_handler but only to set a SPA ( fallback to the /index.html ) or to set a 404 page




