lib.syntax
- Type:
- Default:
'esnext' - CLI:
--syntax <value>(repeatable, e.g.--syntax es2018or--syntax="node 14" --syntax="Chrome 103")
Configure the syntax to which JavaScript and CSS will be downgraded.
See Output Compatibility - Syntax Downgrade for more details.
Set ECMAScript version
You can set the ECMAScript version directly, such as es2015, es2022, etc.
rslib.config.ts
Set browserslist query
You can also set the Browserslist query, such as last 2 versions, > 1%, node >= 16, chrome >= 80, etc.
rslib.config.ts
Mix ECMAScript version and browserslist query
You can also mix ECMAScript version and Browserslist query, such as es2015 and node 20. Rslib will turn ECMAScript Version into Browserslist query, and then merge them together.
rslib.config.ts
