import type { BuildOptions } from "esbuild-wasm";

export const DEFAULT_GLOB_PATTERNS = [
  ".next/static/**/*.{js,css,html,ico,apng,png,avif,jpg,jpeg,jfif,pjpeg,pjp,gif,svg,webp,json,webmanifest}",
  "public/**/*",
];

export const SUPPORTED_ESBUILD_OPTIONS = [
  // CommonOptions
  "sourcemap",
  "legalComments",
  "sourceRoot",
  "sourcesContent",
  "format",
  "globalName",
  "target",
  "supported",
  "define",
  "treeShaking",
  "minify",
  "mangleProps",
  "reserveProps",
  "mangleQuoted",
  "mangleCache",
  "drop",
  "dropLabels",
  "minifyWhitespace",
  "minifyIdentifiers",
  "minifySyntax",
  "lineLimit",
  "charset",
  "ignoreAnnotations",
  "jsx",
  "jsxFactory",
  "jsxFragment",
  "jsxImportSource",
  "jsxDev",
  "jsxSideEffects",
  "pure",
  "keepNames",
  "absPaths",
  "color",
  "logLevel",
  "logLimit",
  "logOverride",
  "tsconfigRaw",
  // BuildOptions
  "bundle",
  "splitting",
  "preserveSymlinks",
  "external",
  "packages",
  "alias",
  "loader",
  "resolveExtensions",
  "mainFields",
  "conditions",
  "allowOverwrite",
  "tsconfig",
  "outExtension",
  "publicPath",
  "inject",
  "banner",
  "footer",
  "plugins",
] as const satisfies readonly (keyof BuildOptions)[];
