ES6 support for 'netlify dev'?

It seems that ‘netlify dev’ does not work with es6 syntax. Example, using ‘export const handler = async () => {’ in a Netlify function will not run with using ‘netlify dev’.

It works just fine once deployed on Netlify, but not in local development.

Are there any plans to make this work on local?

Here’s my current setup:

ntl --version
netlify-cli/17.26.0 darwin-x64 node-v20.11.0


  "type": "module",


export const handler = async () => {
  return {
    statusCode: 200,
    body: JSON.stringify({
      message: 'Hello world!'


  command = "# no build command"
  functions = "netlify/functions"
  publish = "public"

  node_bundler = "esbuild"

On running netlify dev

> netlify dev

◈ Netlify Dev ◈
◈ Injecting environment variable values for all scopes
◈ Ignored general context env var: LANG (defined in process)
◈ No app server detected. Using simple static server
◈ Running static server from "draft-and-flow-api/public"
◈ Setting up local development server
Cleaned up .netlify/functions-internal.

◈ Static server listening to 3999

   │                                                 │
   │   ◈ Server now ready on http://localhost:8888   │
   │                                                 │

◈ Loaded function hello-world
Request from ::1: GET /.netlify/functions/hello-world

◈ Function hello-world has returned an error: Unexpected token 'export'
    at ort const handler = async () => {
    at ^^^
    at taxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:77:18)
    at wrapSafe (node:internal/modules/cjs/loader:1288:20)
    at Module._compile (node:internal/modules/cjs/loader:1340:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object._executeSync (/Users/brettdewoody/Documents/draft-and-flow-api/node_modules/netlify-cli/node_modules/lambda-local/build/lambdalocal.js:380:31)
    at /Users/brettdewoody/Documents/draft-and-flow-api/node_modules/netlify-cli/node_modules/lambda-local/build/lambdalocal.js:96:26

Response with status 500 in 22 ms.
◈ Rewrote URL to /.netlify/functions/sw.js
Request from ::1: GET /.netlify/functions/sw.js
Response with status 404 in 1 ms.

Works fine for me: netlify-support/netlify/functions/api.ts at main · hrishikesh-k/netlify-support · GitHub. Mind sharing a reproduction?