lib.autoExtension
- Type:
boolean - Default:
true - CLI:
--auto-extension/--no-auto-extension
Whether to automatically set the file extension based on the format option in the JavaScript output files.
Default extension
By default that when autoExtension is set to true, the file extension will be:
-
.jswithesmformat and.cjswithcjsformat whentype: moduleinpackage.json. -
.jswithcjsformat and.mjswithesmformat whentype: commonjsor notypefield inpackage.json.
When autoExtension is set to false, the file extension will be default to .js.
Customize extension
You can set autoExtension to false and use output.filename to customize the JavaScript output files.
rslib.config.ts
