rolldown 1.0.3

Fast JavaScript bundler in Rust, designed for the future of Vite
Documentation
use rolldown::{Bundler, BundlerOptions, InputItem, SourceMapType};
use rolldown_workspace as workspace;
use sugar_path::SugarPath;

// cargo run --example basic

#[tokio::main]
async fn main() {
  let mut bundler = Bundler::new(BundlerOptions {
    input: Some(vec![
      "./entry.js".to_string().into(),
      InputItem { import: "./other-entry.js".to_string(), ..Default::default() },
      InputItem { name: Some("third-entry".to_string()), import: "./third-entry.js".to_string() },
    ]),
    cwd: Some(workspace::crate_dir("rolldown").join("./examples/basic").normalize().into_owned()),
    sourcemap: Some(SourceMapType::File),
    ..Default::default()
  })
  .expect("Failed to create bundler");

  let _result = bundler.write().await.unwrap();
}

// trigger