6 Replies
It depends on your projects settings. If your output directory is
output
then that is correct. If you are using the top level directory then it just needs to be called _worker.js
okay got it, let me try @Cyb3r-Jok3
while deployinbg i am getting the following error --> Error: Failed to publish your Function. Got error: multipart uploads must contain a readable body_part or main_module
-worker.js is added
What does your
_worker.js
look like?I don't think Pages supports the Service Format for workers. You'll need to convert to ES modules https://developers.cloudflare.com/workers/learning/migrate-to-module-workers/
Migrate to ES modules format · Cloudflare Workers docs
This guide will show you how to migrate your Workers from the Service Worker format to the ES modules format.
checking