async function api_esm(task, opts) {
  await task
    .source('src/api/**/*.+(js|mts|ts|tsx)')
    .swc('server', { dev: opts.dev, esm: true })
    .target('dist/api')
    .target('dist/esm/api')
}
/!(*.test).+(js|ts|tsx)')
    .swc('server', { dev: opts.dev })
    .target('dist/server')
}

export async function server_esm(task, opts) {
  await task
    .source('src/server/*