For anybody else that s interested after
For anybody else that's interested, after some further investigation, I can confirm that these docs are incorrect. If you deploy
_routes.json
, even when using advanced mode (_worker.js
), you do not need to serve static assets using env.ASSETS.fetch
-- it's done for you.1 Reply
However it's worth pointing out that
wrangler pages dev
doesn't handle _routes.json out the box, so for local development you do need to serve assets, I just kept it simple and did this:
i.e. we don't care about performance so much during local development so can ignore the routing logic in _route.json.