From 91daba8bbf0b436c26233721f1915eff7d9c0c10 Mon Sep 17 00:00:00 2001 From: JW Date: Fri, 21 Jun 2024 18:14:23 +0800 Subject: [PATCH] chore: use add_include --- .../rspack_plugin_rsc/src/loader/rsc_client_entry_loader.rs | 4 ++-- .../src/plugin/rsc_client_reference_manifest_rspack_plugin.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/rspack_plugin_rsc/src/loader/rsc_client_entry_loader.rs b/crates/rspack_plugin_rsc/src/loader/rsc_client_entry_loader.rs index 5fb633791d8f..2ce98f82f860 100644 --- a/crates/rspack_plugin_rsc/src/loader/rsc_client_entry_loader.rs +++ b/crates/rspack_plugin_rsc/src/loader/rsc_client_entry_loader.rs @@ -27,7 +27,7 @@ pub struct RSCClientEntryLoader { options: RSCClientEntryLoaderOptions, } #[derive(Debug, Clone, Default)] -pub struct QueryParsedRequest { +struct QueryParsedRequest { pub is_client_entry: bool, pub is_route_entry: bool, pub chunk_name: String, @@ -55,7 +55,7 @@ impl RSCClientEntryLoader { Some(Path::new(&self.options.root).join(file_name)) } - pub fn parse_query(&self, query: Option<&str>) -> QueryParsedRequest { + fn parse_query(&self, query: Option<&str>) -> QueryParsedRequest { if let Some(query) = query { let hash_query: HashMap<_, _> = form_urlencoded::parse(query.trim_start_matches('?').as_bytes()) diff --git a/crates/rspack_plugin_rsc/src/plugin/rsc_client_reference_manifest_rspack_plugin.rs b/crates/rspack_plugin_rsc/src/plugin/rsc_client_reference_manifest_rspack_plugin.rs index e94c18360ed2..448c91e030da 100644 --- a/crates/rspack_plugin_rsc/src/plugin/rsc_client_reference_manifest_rspack_plugin.rs +++ b/crates/rspack_plugin_rsc/src/plugin/rsc_client_reference_manifest_rspack_plugin.rs @@ -46,7 +46,7 @@ impl RSCClientReferenceManifestRspackPlugin { ); let entry = Box::new(EntryDependency::new(request, context.clone(), false)); compilation - .add_entry( + .add_include( entry, EntryOptions { name: Some(String::from("client-entry")), @@ -61,7 +61,7 @@ impl RSCClientReferenceManifestRspackPlugin { ); let entry = Box::new(EntryDependency::new(request, context.clone(), false)); compilation - .add_entry( + .add_include( entry, EntryOptions { name: Some(String::from("client-entry")),