Task Definitions: None
Template Definitions: 'terser'
Batcher Defintions: None
Performs a single-file Terser minification.
auto-install
(Boolean, default:true
): Whether to automatically installterser
with npm if not present (using the npm extension). The global npm extensionauto-install
option will take precedence here if not otherwise set....terserOptions
. Options are exactly per Terser documentation, as kabab-case keys per Chomp serialization conventions.
chompfile.toml
version = 0.1
extensions = ['[email protected]:terser']
[[task]]
name = 'test'
target = 'dist/app.js'
dep = 'dist/app.min.js'
template = 'terser'
[task.template-options]
module = true
compress = { ecma = 6, unsafe = true }
source-maps = true
When using source-maps
, the sourceURL
comment and sources content will be automatically enabled by the extension.
When ejecting the template, the JS Terser API usage will be ejected, without auto-installation.