Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a committed Jan 7, 2025
1 parent d84cd90 commit 1e96c6e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/rspack/src/options/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub struct BuilderContext {
plugins: Vec<BuiltinPluginOptions>,
}

/// Builter used to build [`CompilerOptions`]
/// Builder used to build [`CompilerOptions`]
#[derive(Debug, Default)]
pub struct CompilerOptionsBuilder {
name: Option<String>,
Expand Down Expand Up @@ -413,7 +413,7 @@ impl CompilerOptionsBuilder {
}
}

/// Builter used to build [`ModuleOptions`]
/// Builder used to build [`ModuleOptions`]
#[derive(Debug, Default)]
pub struct ModuleOptionsBuilder {
rules: Vec<ModuleRule>,
Expand Down Expand Up @@ -853,7 +853,7 @@ fn default_rules(async_web_assembly: bool, css: bool) -> Vec<ModuleRule> {
rules
}

/// Builter used to build [`OutputOptions`]
/// Builder used to build [`OutputOptions`]
#[derive(Debug, Default)]
pub struct OutputOptionsBuilder {
path: Option<Utf8PathBuf>,
Expand Down Expand Up @@ -1480,11 +1480,11 @@ impl OutputOptionsBuilder {
enabled_library_types
});

enabled_library_types.iter().for_each(|ty| {
for ty in enabled_library_types.iter() {
builder_context
.plugins
.push(BuiltinPluginOptions::EnableLibraryPlugin(ty.clone()));
});
}

let enabled_chunk_loading_types = f!(self.enabled_chunk_loading_types.take(), || {
let mut enabled_chunk_loading_types = vec![];
Expand All @@ -1499,11 +1499,11 @@ impl OutputOptionsBuilder {
enabled_chunk_loading_types
});

enabled_chunk_loading_types.iter().for_each(|ty| {
for ty in enabled_chunk_loading_types.iter() {
builder_context
.plugins
.push(BuiltinPluginOptions::EnableChunkLoadingPlugin(*ty));
});
}

let enabled_wasm_loading_types = f!(self.enabled_wasm_loading_types.take(), || {
let mut enabled_wasm_loading_types = vec![];
Expand All @@ -1517,11 +1517,11 @@ impl OutputOptionsBuilder {
enabled_wasm_loading_types
});

enabled_wasm_loading_types.iter().for_each(|ty| {
for ty in enabled_wasm_loading_types.iter() {
builder_context
.plugins
.push(BuiltinPluginOptions::EnableWasmLoadingPlugin(*ty));
});
}

let environment = Environment {
r#const: tp.and_then(|t| t.r#const),
Expand Down Expand Up @@ -1599,7 +1599,7 @@ impl OutputOptionsBuilder {
}
}

/// Builter used to build [`Experiments`]
/// Builder used to build [`Experiments`]
#[derive(Debug, Default)]
pub struct ExperimentsBuilder {
layers: Option<bool>,
Expand Down

0 comments on commit 1e96c6e

Please sign in to comment.