Task Definitions: None
Template Definitions: 'rollup'
Batcher Definitions: None
Performs a chunked RollupJS build, exposing the full RollupJS configuration per the documentation.
Exact same options as the RollupJS configuration documentation with a few exceptions / additions:
output
should be an object and not an array.warn: false
is supported to disable warnings.#PJSON_VERSION
is supported for version substitution in thebanner
output option.plugin
is an array of{ package, ...pluginOptions }
option, where the plugin is imported asimport '<package>'
.auto-install
: Set to false to disable auto install of plugins packages and RollupJS.clear-dir
: Boolean, defaults to false, whether to remove all files in the output directory before starting the build.
The template can run in two "modes":
- Do not set
output.file
oroutput.dir
orinput
, and then the template will setinput
todep
andoutput.file
totarget
for a single-file build. - Use
input
andoutput
options per RollupJS configuration, andtargets
anddeps
will automatically be inferred from this configuration.
Currently entryFileNames
support is not included for target
inferrence, although this feature should be added in future.
chompfile.toml
version = 0.1
extensions = ['[email protected]:rollup']
[[task]]
template = 'rollup'
[task.template-options]
input = ['src/app.js', 'src/feature.js']
onwarn = false
sourcemap = true
clear-dir = true
[task.template-options.output]
dir = 'dist'
banner = '''/*!
* App #PJSON_VERSION
*/'''
format = 'esm'
[[task.template-options.plugin]]
package = '@rollup/plugin-replace'
"process.env.NODE_ENV" = 'production'
Where dist/app.js
and dist/feature.js
will be created as inlining all their dependencies while having a shared chunk file as appropriate in the build.
When ejecting the template, only the Rollup compilation CLI command will be ejected, without any auto installation tasks.