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.