The preview support for ESM (ES6) modules available (#104 for tracking) requires the use of `mjs` file extensions (https://github.com/Azure/azure-functions-nodejs-worker/blob/v3.x/src/FunctionLoader.ts#L31 for source reference) which is a bit of a pain when it comes to working with TypeScript, [you need to use the nightly compiler](https://www.typescriptlang.org/docs/handbook/esm-node.html) to output a `mjs` extension. It would be good if the worker would respect the [`type` field in package.json](https://nodejs.org/docs/latest-v16.x/api/packages.html#type) and if that is set to `module` it loads them as ESM rather than commonjs.