@@ -370,11 +370,6 @@ pub struct ProjectOptions {
370370
371371 /// Whether server-side HMR is enabled (disabled with --no-server-fast-refresh).
372372 pub server_hmr : bool ,
373-
374- /// A salt to mix into chunk and asset content hashes, allowing users to
375- /// force new filenames without changing file content. Empty string means
376- /// no salt.
377- pub hash_salt : RcStr ,
378373}
379374
380375#[ derive( Default ) ]
@@ -425,9 +420,6 @@ pub struct PartialProjectOptions {
425420 /// Debug build paths for selective builds.
426421 /// When set, only routes matching these paths will be included in the build.
427422 pub debug_build_paths : Option < DebugBuildPaths > ,
428-
429- /// An optional salt to mix into chunk and asset content hashes.
430- pub hash_salt : Option < RcStr > ,
431423}
432424
433425#[ derive(
@@ -687,7 +679,6 @@ impl ProjectContainer {
687679 no_mangling,
688680 write_routes_hashes_manifest,
689681 debug_build_paths,
690- hash_salt,
691682 } = options;
692683
693684 let mut new_options = this
@@ -738,9 +729,6 @@ impl ProjectContainer {
738729 if let Some ( debug_build_paths) = debug_build_paths {
739730 new_options. debug_build_paths = Some ( debug_build_paths) ;
740731 }
741- if let Some ( hash_salt) = hash_salt {
742- new_options. hash_salt = hash_salt;
743- }
744732
745733 // TODO: Handle mode switch, should prevent mode being switched.
746734 let watch = new_options. watch ;
@@ -823,7 +811,6 @@ impl ProjectContainer {
823811 let deferred_entries;
824812 let is_persistent_caching_enabled;
825813 let server_hmr;
826- let hash_salt;
827814 {
828815 let options = self . options_state . get ( ) ;
829816 let options = options
@@ -852,7 +839,6 @@ impl ProjectContainer {
852839 deferred_entries = options. deferred_entries . clone ( ) . unwrap_or_default ( ) ;
853840 is_persistent_caching_enabled = options. is_persistent_caching_enabled ;
854841 server_hmr = options. server_hmr ;
855- hash_salt = options. hash_salt . clone ( ) ;
856842 }
857843
858844 let root_path = ResolvedVc :: cell ( root_path_str) ;
@@ -884,7 +870,6 @@ impl ProjectContainer {
884870 deferred_entries,
885871 is_persistent_caching_enabled,
886872 server_hmr,
887- hash_salt,
888873 }
889874 . cell ( ) )
890875 }
@@ -988,10 +973,6 @@ pub struct Project {
988973
989974 /// Whether server-side HMR is enabled (disabled with --no-server-fast-refresh).
990975 server_hmr : bool ,
991-
992- /// A salt to mix into chunk and asset content hashes. Empty string means
993- /// no salt.
994- hash_salt : RcStr ,
995976}
996977
997978#[ turbo_tasks:: value]
@@ -1249,11 +1230,6 @@ impl Project {
12491230 Vc :: cell ( self . no_mangling )
12501231 }
12511232
1252- #[ turbo_tasks:: function]
1253- pub ( crate ) fn hash_salt ( & self ) -> Vc < RcStr > {
1254- Vc :: cell ( self . hash_salt . clone ( ) )
1255- }
1256-
12571233 #[ turbo_tasks:: function]
12581234 pub ( super ) async fn execution_context ( self : Vc < Self > ) -> Result < Vc < ExecutionContext > > {
12591235 let node_root = self . node_root ( ) . owned ( ) . await ?;
@@ -1609,7 +1585,7 @@ impl Project {
16091585 debug_ids : self . next_config ( ) . turbopack_debug_ids ( ) ,
16101586 should_use_absolute_url_references : self . next_config ( ) . inline_css ( ) ,
16111587 css_url_suffix,
1612- hash_salt : self . hash_salt ( ) . to_resolved ( ) . await ?,
1588+ hash_salt : self . next_config ( ) . output_hash_salt ( ) . to_resolved ( ) . await ?,
16131589 cross_origin : self . next_config ( ) . cross_origin ( ) ,
16141590 } ) )
16151591 }
@@ -1645,7 +1621,7 @@ impl Project {
16451621 . await ?,
16461622 asset_prefix : self . next_config ( ) . computed_asset_prefix ( ) . owned ( ) . await ?,
16471623 css_url_suffix,
1648- hash_salt : self . hash_salt ( ) . to_resolved ( ) . await ?,
1624+ hash_salt : self . next_config ( ) . output_hash_salt ( ) . to_resolved ( ) . await ?,
16491625 } ;
16501626 Ok ( if client_assets {
16511627 get_server_chunking_context_with_client_assets ( options)
@@ -1684,7 +1660,7 @@ impl Project {
16841660 . await ?,
16851661 asset_prefix : self . next_config ( ) . computed_asset_prefix ( ) . owned ( ) . await ?,
16861662 css_url_suffix,
1687- hash_salt : self . hash_salt ( ) . to_resolved ( ) . await ?,
1663+ hash_salt : self . next_config ( ) . output_hash_salt ( ) . to_resolved ( ) . await ?,
16881664 cross_origin : self . next_config ( ) . cross_origin ( ) ,
16891665 } ;
16901666 Ok ( if client_assets {
0 commit comments