Wrangler compiling in an incompatible way?

As mentioned here coding-help

I'm using wrangler to publish a worker, but there seems to be a bug.

In my code
index.ts
I export default like so

export default { email };

When using
wrangler publish
it compiles to:

var src_default = { email };
export {
  src_default as default
};


And in the dashboard when I try to test it it tells me

Email Trigger not available to this workers


Though when I change it manually to the former again:
export default { email };

It seems to work and goes to the next error about a constructor.


Changing the
tsconfig.json
file doesn't seem to make any difference at all.

Looks like a bug to me. Any ideas of what I can try?
Was this page helpful?