From 56f58e7bbc0f1d6dde2d03dc7df7718ed5c019a6 Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Mon, 23 Dec 2024 13:13:00 +0900 Subject: [PATCH] chore: update comment about `build.target` --- packages/vite/src/node/build.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts index cb654dd2d35719..2eae8a28fac705 100644 --- a/packages/vite/src/node/build.ts +++ b/packages/vite/src/node/build.ts @@ -78,16 +78,15 @@ import type { RollupPluginHooks } from './typeUtils' export interface BuildEnvironmentOptions { /** * Compatibility transform target. The transform is performed with esbuild - * and the lowest supported target is es2015/es6. Note this only handles - * syntax transformation and does not cover polyfills (except for dynamic - * import) + * and the lowest supported target is es2015. Note this only handles + * syntax transformation and does not cover polyfills * - * Default: 'modules' - Similar to `@babel/preset-env`'s targets.esmodules, - * transpile targeting browsers that natively support dynamic es module imports. - * https://caniuse.com/es6-module-dynamic-import + * Default: 'modules' - transpile targeting browsers that natively support + * dynamic es module imports and `import.meta` + * (Chrome 87+, Firefox 78+, Safari 14+, Edge 88+). * * Another special value is 'esnext' - which only performs minimal transpiling - * (for minification compat) and assumes native dynamic imports support. + * (for minification compat). * * For custom targets, see https://esbuild.github.io/api/#target and * https://esbuild.github.io/content-types/#javascript for more details.