brk_rolldown 0.8.0

Fast JavaScript bundler in Rust, designed for the future of Vite
Documentation
use rolldown::{BundlerConfig, BundlerOptions, ExperimentalOptions, Watcher};
use sugar_path::SugarPath;

// cargo run --example watch

#[tokio::main]
async fn main() {
  let config = BundlerConfig::new(
    BundlerOptions {
      input: Some(vec!["./entry.js".to_string().into()]),
      cwd: Some(rolldown_workspace::crate_dir("rolldown").join("./examples/basic").normalize()),

      experimental: Some(ExperimentalOptions {
        incremental_build: Some(true),
        ..Default::default()
      }),
      ..Default::default()
    },
    vec![],
  );
  let watcher = Watcher::new(config, None).unwrap();
  watcher.start().await;
}