Email worker doesn't work if built via repo, does work with direct code?

What is the name of the domain?

tinkler.email

What is the issue you’re encountering

I created an email worker based off this template: GitHub - krystof-k/cloudflare-email-forwarding: Boilerplate for free advanced email forwarding via Cloudflare and set the Catch-all rule to send emails to it. However despite building successfully the forwarding does not work and emails just fail to deliver when tested.

What steps have you taken to resolve the issue?

I created another email worker, but instead of building from repo I just copied the code straight into the code editor, and this approach worked and emails were successfully forwarded. When I open both workers in the code editor, the repo-based worker code has been transpiled e.g.

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

// index.js
var repo_default = {
  async email(message, env, ctx) {
    const forwardList = {
      "[email protected]": "[email protected]"
    };
    ...

and when I use the email test function it says Email Trigger not available to this workers but again the worker where i just paste the code into the editor works fine both in test and production

What are the steps to reproduce the issue?

create a bot and point it to a repo based on this template: GitHub - krystof-k/cloudflare-email-forwarding: Boilerplate for free advanced email forwarding via Cloudflare

attempt to have it forward emails (either using code editor console or attached to the Catch-all rule)

on further testing it does seem to work in production, the first few delivery attempts failed but then it succeeded. console still gives the error though