Skip to content

Commit

Permalink
fix: add option to switch asset manifest plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia committed Feb 2, 2024
1 parent a763ac9 commit 19ed57f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/binding_options/src/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ impl RSPackRawOptions {
let node = self.node.map(|n| n.into());

// Add custom plugins.
plugins.push(Box::new(plugin_manifest::ManifestPlugin::new()));
if self.features.assets_manifest.unwrap_or_default() {
plugins.push(Box::new(plugin_manifest::ManifestPlugin::new()));
}

let mut builtins = self.builtins.apply(plugins)?;
if experiments.rspack_future.new_treeshaking {
builtins.tree_shaking = TreeShaking::False;
Expand Down
1 change: 1 addition & 0 deletions crates/binding_options/src/options/raw_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,5 @@ pub struct RawStrategyOptions {
#[napi(object)]
pub struct RawFeatures {
pub split_chunks_strategy: Option<RawStrategyOptions>,
pub assets_manifest: Option<bool>,
}

0 comments on commit 19ed57f

Please sign in to comment.