Skip to content

Commit

Permalink
docs: build.target terser < 5.16 specific behaviour (#12506)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentpayot authored Mar 21, 2023
1 parent 33baff5 commit aecb9b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/config/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Browser compatibility target for the final bundle. The default value is a Vite s

Another special value is `'esnext'` - which assumes native dynamic imports support and will transpile as little as possible:

- If the [`build.minify`](#build-minify) option is `'terser'`, `'esnext'` will be forced down to `'es2021'`.
- If the [`build.minify`](#build-minify) option is `'terser'` and the installed Terser version is below 5.16.0, `'esnext'` will be forced down to `'es2021'`.
- In other cases, it will perform no transpilation at all.

The transform is performed with esbuild and the value should be a valid [esbuild target option](https://esbuild.github.io/api/#target). Custom targets can either be an ES version (e.g. `es2015`), a browser with version (e.g. `chrome58`), or an array of multiple target strings.
Expand Down

0 comments on commit aecb9b1

Please sign in to comment.