blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js

Home Page:https://Blitzjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow override of "target" for ES2016+ features in Custom Server

adam-sajko opened this issue · comments

https://github.com/blitz-js/blitz/blob/main/packages/blitz/src/cli/utils/next-utils.ts#L58

const getEsbuildOptions = (): esbuild.BuildOptions => {
  return {
    ...
    target: "es6",
    ...
  }
}

The current implementation of getEsbuildOptions function hardcodes the target setting to "es6". This setting restricts the server from utilizing JavaScript features introduced in ES2016 and later versions. It would be beneficial to provide a mechanism that allows overriding the target option to support modern JavaScript features in a custom server environment.

thanks for the issue @adam-sajko, would you like to work on exposing this?