More than on worker in the same account?

Hey there,

Can we able to run different worker script in the same file?

I’m trying to the mix these two scripts on one and run it.

https://github.com/vidaxl-com/Cloudflare_webworkers/blob/master/examples/webp.js (webp conversion script)

https://raw.githubusercontent.com/Cloudflare/worker-examples/master/examples/edge-cache-html/edge-cache-html.js (edge cache script)

Thanks

I do something like this:

const parsedUrl = new URL(event.request.url);
let elements = parsedUrl.pathname.split('/').filter(n => n);
if (elements[0] === 'webp'){
// run a function
}