OXC.Bundle (OXC v0.16.0)

Copy Markdown View Source

Composable JavaScript bundling pipeline.

Build immutable bundle configuration with pipeline-friendly functions, then execute the native Rolldown run once with run/1.

Summary

Types

t()

@type t() :: %OXC.Bundle{
  asset_file_names: term(),
  banner: term(),
  chunk_file_names: term(),
  conditions: term(),
  cwd: term(),
  define: term(),
  drop_console: term(),
  entries: term(),
  entry_file_names: term(),
  exports: term(),
  external: term(),
  files: term(),
  footer: term(),
  format: term(),
  import_source: term(),
  jsx: term(),
  jsx_factory: term(),
  jsx_fragment: term(),
  main_fields: term(),
  minify: term(),
  module_types: term(),
  modules: term(),
  outdir: term(),
  preamble: term(),
  preserve_entry_signatures: term(),
  sourcemap: term(),
  target: term(),
  treeshake: term()
}

Functions

cwd(bundle, cwd)

entries(bundle, entries)

@spec entries(t(), [
  OXC.Bundle.Entry.t()
  | map()
  | {String.t(), String.t()}
  | {String.t(), String.t(), iodata()}
  | String.t()
]) :: t()

entry(bundle, entry)

@spec entry(
  t(),
  OXC.Bundle.Entry.t()
  | map()
  | {String.t(), String.t()}
  | {String.t(), String.t(), iodata()}
  | String.t()
) :: t()

file(bundle, arg)

files(bundle, files)

format(bundle, format)

minify(bundle, value \\ true)

new(opts \\ [])

@spec new(keyword()) :: t()

outdir(bundle, outdir)

output(bundle, opts)

resolve(bundle, opts)

run(bundle)

@spec run(t()) :: {:ok, OXC.Bundle.Result.t()} | {:error, [map()]}

transform(bundle, opts)

treeshake(bundle, value \\ true)