rolldown 0.1.1

Fast JavaScript bundler in Rust, designed for the future of Vite
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rolldown_common::{OutputFormat, RawMinifyOptions};

/// Determines the default value for `minify_internal_exports` based on format and minify settings.
///
/// Returns `true` if:
/// - format is `Esm`, OR
/// - minify is `Bool(true)` or `Object(_)`
///
/// Otherwise returns `false`.
pub fn determine_minify_internal_exports_default(
  format: Option<OutputFormat>,
  minify: &RawMinifyOptions,
) -> bool {
  matches!(format, Some(OutputFormat::Esm))
    || matches!(minify, RawMinifyOptions::Bool(true) | RawMinifyOptions::Object(_))
}