From 0e9e81f622f13d78ee238c0fa72ba920e23419f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 24 Dec 2024 00:04:50 +0900 Subject: [PATCH] chore: update comment about `build.target` (#19047) --- 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.