Skip to main content

Crate bundla

Crate bundla 

Source
Expand description

Bundle HTML, CSS, and JS/TS for prod or dev with live-reload.

  • Prod build src/ into dist/ with minification and hashed filenames,
  • Dev build src/ into dev/ with sourcemaps,
  • Option to watch and build on change,
  • Option to filter watched files by name or suffix,
  • Option to serve the bundle.

Serving is optional: the serve feature is on by default, and default-features = false builds without the axum dependency.

See the README for features, CLI, and library usage.

Structs§

BuildOptions
Build options for the HTML, CSS, JS/TS output.
Minify
Set of output targets to minify.
Server
Alias of webadev::Server, re-exported from webadev. A bound server, ready to run. run starts serving only when awaited, so the url can be shown first.
ServerConfig
Alias of webadev::Config, re-exported from webadev. Configuration for the server
Watch
Headless watch handle returned by watch.

Enums§

BuildCause
What triggered a build during watch.
ReloadType
Alias of webadev::ReloadType, re-exported from webadev. How to reload a browser tab on file change
WatchLog
A runtime log line from the watch loop, sent on the caller’s broadcast channel so the library never prints directly.

Functions§

build
Build the HTML, CSS, and JS/TS assets from src into dist.
serve
Serve config.dir without watching or building. Optional config.base prefix.
watch
Watch src and build it into dist on startup and on every change, without serving. Headless: no server, no port, no browser.
watch_serve
Watch and serve: