Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.04 KB

ncc.md

File metadata and controls

39 lines (27 loc) · 1.04 KB

NCC Extension

Task Definitions: None
Template Definitions: 'ncc'
Batcher Definitions: None

Uses ncc to compile a Node.js application into a single file.

NCC Template

Template Options

  • assets: Set to false to disable asset builds.
  • autoInstall: Set to false to disable auto install of plugins packages and RollupJS.
  • sourceMap: Set to true to enable source maps for the build.
  • esm: Set to true to output an ES module, or false to output CJS. Defaults to format of the input file.

Example

chompfile.toml

version = 0.1

extensions = ['[email protected]:ncc']

[[task]]
template = 'ncc'
target = 'dist/build.js'
deps = ['src/app.js', 'src/**/*.js']
[task.template-options]
assets = false
source-map = true

Builds src/app.js and all of its dependencies into dist/build.js disabling asset relocations.

Ejection

When ejecting the template, only the Rollup compilation CLI command will be ejected, without any auto installation tasks.