A template for kick starting a Cloudflare Workers project using custom builds and webpack
-
Worker code is in
src/
. The event handler is inindex.js
, and thehandleRequest
method is inhandleRequest.js
, to demonstrate a multi-file project -
The compiled main module is set using the
package.json
main
field, as it is with othertype = "javascript"
service-worker projects. This should be set to the compiled bundle, in this casedist/worker.js
.