Getting "unexpected token: export" with Miniflare and modules

I’m trying to mount my worker as shown in the docs ( The “main” of this worker is src/index.mjs. I’m using modules. I’m not using TypeScript. I’m on Windows.

Here is my wrangler.toml:

name = "foo"
compatibility_date = "2023-04-24"

gateway = "./workers/gateway"

format = "modules"
type = "ESModule"
globs = ["**/*.js"]

I’m invoking the cli with the following command:

miniflare -m

And I get this error:

[mf:err] Cause: C:\foo\workers\gateway\src\index.mjs:1
export default {
SyntaxError: Unexpected token 'export'
MiniflareCoreError [ERR_MOUNT]: Error mounting "gateway"

Can someone help me troubleshoot this?