I have some feedback for Pages to

I have some feedback for Pages to Workers migration. If you're serving static assets without going through a worker first, you should remove the [assets]binding="" from wrangler.toml. It would be nice to see this in the migration guide, I would think more often than not, a Pages project will be migrated to a static worker + multiple workers, or by just compiling Page Functions into one worker. name = 'sh8r-static' [assets] directory = "dist" not_found_handling = "404-page"
No description
5 Replies
petebd
petebd6mo ago
Thanks for this feedback. Does this actually break your app or is it just superfluous?
Xld3
Xld3OP6mo ago
Well this won't deploy unless you remove that binding. Everything seems to work as expected, but as someone who just moved from Pages to Workers, a static worker is really the first example I want to see. Would've saved me some time while migrating :). I'm not sure how everyone is using Pages but this seems pretty common.
No description
Xld3
Xld3OP6mo ago
Also, I assume this configuration is the only way to get that special "static" tag on the worker? Not sure if its there when you include a main.js.
petebd
petebd6mo ago
We should definitely add it to the migration guide. Thank you for the feedback
petebd
petebd6mo ago
GitHub
Tell the reader to remove unwanted binding property in "Pages to ...
This was brought up in the Wrangler Discord office hours Documentation checklist The documentation style guide has been adhered to.

Did you find this page helpful?