@@ -75,40 +75,40 @@ impl Default for CacheKinds {
75
75
#[ derive( Clone , Debug , Default , PartialEq ) ]
76
76
#[ serde( default , rename_all = "camelCase" ) ]
77
77
pub struct NextConfig {
78
- // IMPORTANT: all fields should be private and access should be wrapped within a turbo-tasks
79
- // function. Otherwise changing NextConfig will lead to invalidating all tasks accessing it.
80
- config_file : Option < RcStr > ,
81
- config_file_name : RcStr ,
78
+ // TODO all fields should be private and access should be wrapped within a turbo-tasks function
79
+ // Otherwise changing NextConfig will lead to invalidating all tasks accessing it.
80
+ pub config_file : Option < RcStr > ,
81
+ pub config_file_name : RcStr ,
82
82
83
83
/// In-memory cache size in bytes.
84
84
///
85
85
/// If `cache_max_memory_size: 0` disables in-memory caching.
86
- cache_max_memory_size : Option < f64 > ,
86
+ pub cache_max_memory_size : Option < f64 > ,
87
87
/// custom path to a cache handler to use
88
- cache_handler : Option < RcStr > ,
89
-
90
- env : FxIndexMap < String , JsonValue > ,
91
- experimental : ExperimentalConfig ,
92
- images : ImageConfig ,
93
- page_extensions : Vec < RcStr > ,
94
- react_compiler : Option < ReactCompilerOptionsOrBoolean > ,
95
- react_production_profiling : Option < bool > ,
96
- react_strict_mode : Option < bool > ,
97
- transpile_packages : Option < Vec < RcStr > > ,
98
- modularize_imports : Option < FxIndexMap < String , ModularizeImportPackageConfig > > ,
99
- dist_dir : Option < RcStr > ,
100
- deployment_id : Option < RcStr > ,
88
+ pub cache_handler : Option < RcStr > ,
89
+
90
+ pub env : FxIndexMap < String , JsonValue > ,
91
+ pub experimental : ExperimentalConfig ,
92
+ pub images : ImageConfig ,
93
+ pub page_extensions : Vec < RcStr > ,
94
+ pub react_compiler : Option < ReactCompilerOptionsOrBoolean > ,
95
+ pub react_production_profiling : Option < bool > ,
96
+ pub react_strict_mode : Option < bool > ,
97
+ pub transpile_packages : Option < Vec < RcStr > > ,
98
+ pub modularize_imports : Option < FxIndexMap < String , ModularizeImportPackageConfig > > ,
99
+ pub dist_dir : Option < RcStr > ,
100
+ pub deployment_id : Option < RcStr > ,
101
101
sass_options : Option < serde_json:: Value > ,
102
- trailing_slash : Option < bool > ,
103
- asset_prefix : Option < RcStr > ,
104
- base_path : Option < RcStr > ,
105
- skip_middleware_url_normalize : Option < bool > ,
106
- skip_trailing_slash_redirect : Option < bool > ,
107
- i18n : Option < I18NConfig > ,
102
+ pub trailing_slash : Option < bool > ,
103
+ pub asset_prefix : Option < RcStr > ,
104
+ pub base_path : Option < RcStr > ,
105
+ pub skip_middleware_url_normalize : Option < bool > ,
106
+ pub skip_trailing_slash_redirect : Option < bool > ,
107
+ pub i18n : Option < I18NConfig > ,
108
108
cross_origin : Option < CrossOriginConfig > ,
109
- dev_indicators : Option < DevIndicatorsConfig > ,
109
+ pub dev_indicators : Option < DevIndicatorsConfig > ,
110
110
output : Option < OutputType > ,
111
- turbopack : Option < TurbopackConfig > ,
111
+ pub turbopack : Option < TurbopackConfig > ,
112
112
production_browser_source_maps : bool ,
113
113
output_file_tracing_includes : Option < serde_json:: Value > ,
114
114
output_file_tracing_excludes : Option < serde_json:: Value > ,
@@ -119,21 +119,21 @@ pub struct NextConfig {
119
119
/// server-side bundles.
120
120
///
121
121
/// [API Reference](https://nextjs.org/docs/pages/api-reference/next-config-js/bundlePagesRouterDependencies)
122
- bundle_pages_router_dependencies : Option < bool > ,
122
+ pub bundle_pages_router_dependencies : Option < bool > ,
123
123
124
124
/// A list of packages that should be treated as external on the server
125
125
/// build.
126
126
///
127
127
/// [API Reference](https://nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages)
128
- server_external_packages : Option < Vec < RcStr > > ,
128
+ pub server_external_packages : Option < Vec < RcStr > > ,
129
129
130
130
#[ serde( rename = "_originalRedirects" ) ]
131
- original_redirects : Option < Vec < Redirect > > ,
131
+ pub original_redirects : Option < Vec < Redirect > > ,
132
132
133
133
// Partially supported
134
- compiler : Option < CompilerConfig > ,
134
+ pub compiler : Option < CompilerConfig > ,
135
135
136
- optimize_fonts : Option < bool > ,
136
+ pub optimize_fonts : Option < bool > ,
137
137
138
138
clean_dist_dir : bool ,
139
139
compress : bool ,
@@ -265,7 +265,7 @@ struct HttpAgentConfig {
265
265
}
266
266
267
267
#[ derive(
268
- Clone , Debug , PartialEq , Eq , Serialize , Deserialize , TraceRawVcs , NonLocalValue , OperationValue ,
268
+ Clone , Debug , PartialEq , Serialize , Deserialize , TraceRawVcs , NonLocalValue , OperationValue ,
269
269
) ]
270
270
#[ serde( rename_all = "camelCase" ) ]
271
271
pub struct DomainLocale {
@@ -276,7 +276,7 @@ pub struct DomainLocale {
276
276
}
277
277
278
278
#[ derive(
279
- Clone , Debug , PartialEq , Eq , Serialize , Deserialize , TraceRawVcs , NonLocalValue , OperationValue ,
279
+ Clone , Debug , PartialEq , Serialize , Deserialize , TraceRawVcs , NonLocalValue , OperationValue ,
280
280
) ]
281
281
#[ serde( rename_all = "camelCase" ) ]
282
282
pub struct I18NConfig {
@@ -286,9 +286,6 @@ pub struct I18NConfig {
286
286
pub locales : Vec < String > ,
287
287
}
288
288
289
- #[ turbo_tasks:: value( transparent) ]
290
- pub struct OptionI18NConfig ( Option < I18NConfig > ) ;
291
-
292
289
#[ derive(
293
290
Clone , Debug , PartialEq , Eq , Serialize , Deserialize , TraceRawVcs , NonLocalValue , OperationValue ,
294
291
) ]
@@ -1339,11 +1336,6 @@ impl NextConfig {
1339
1336
Vc :: cell ( self . output == Some ( OutputType :: Standalone ) )
1340
1337
}
1341
1338
1342
- #[ turbo_tasks:: function]
1343
- pub fn base_path ( & self ) -> Vc < Option < RcStr > > {
1344
- Vc :: cell ( self . base_path . clone ( ) )
1345
- }
1346
-
1347
1339
#[ turbo_tasks:: function]
1348
1340
pub fn cache_handler ( & self , project_path : FileSystemPath ) -> Result < Vc < OptionFileSystemPath > > {
1349
1341
if let Some ( handler) = & self . cache_handler {
@@ -1545,11 +1537,6 @@ impl NextConfig {
1545
1537
} ) )
1546
1538
}
1547
1539
1548
- #[ turbo_tasks:: function]
1549
- pub fn inline_css ( & self ) -> Vc < bool > {
1550
- Vc :: cell ( self . experimental . inline_css . unwrap_or ( false ) )
1551
- }
1552
-
1553
1540
#[ turbo_tasks:: function]
1554
1541
pub fn mdx_rs ( & self ) -> Vc < OptionalMdxTransformOptions > {
1555
1542
let options = & self . experimental . mdx_rs ;
@@ -1585,11 +1572,6 @@ impl NextConfig {
1585
1572
Vc :: cell ( self . modularize_imports . clone ( ) . unwrap_or_default ( ) )
1586
1573
}
1587
1574
1588
- #[ turbo_tasks:: function]
1589
- pub fn dist_dir ( & self ) -> Vc < Option < RcStr > > {
1590
- Vc :: cell ( self . dist_dir . clone ( ) )
1591
- }
1592
-
1593
1575
#[ turbo_tasks:: function]
1594
1576
pub fn experimental_cache_handlers (
1595
1577
& self ,
@@ -1886,11 +1868,6 @@ impl NextConfig {
1886
1868
Vc :: cell ( self . cross_origin . clone ( ) )
1887
1869
}
1888
1870
1889
- #[ turbo_tasks:: function]
1890
- pub fn i18n ( & self ) -> Vc < OptionI18NConfig > {
1891
- Vc :: cell ( self . i18n . clone ( ) )
1892
- }
1893
-
1894
1871
#[ turbo_tasks:: function]
1895
1872
pub fn output ( & self ) -> Vc < OptionOutputType > {
1896
1873
Vc :: cell ( self . output . clone ( ) )
0 commit comments