Cyb3r Jak3

@Cyb3r-Jok3 ?
6 Replies
Cyb3r-Jak3
Cyb3r-Jak32y ago
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
javeed
javeedOP2y ago
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
Cyb3r-Jak3
Cyb3r-Jak32y ago
What does your _worker.js look like?
javeed
javeedOP2y ago
here it is
Cyb3r-Jak3
Cyb3r-Jak32y ago
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.
javeed
javeedOP2y ago
checking

Did you find this page helpful?