Unverified Commit 51092ee3 authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

test(turbopack): Configure HMR benchmark (#80219)

### What?

Configure HMR benchmark. I'm not sure if this benchmark would be stable enough, but let's try.

I'll remove this from the automated benchmark later this week if it turns out to be flaky.

### Why?

x-ref: https://vercel.slack.com/archives/C06PPGZ0FD3/p1748943158878159


### How?

Closes PACK-4758
parent d5c5cdef
......@@ -26,6 +26,29 @@ env:
TURBO_TOKEN: ${{ secrets.HOSTED_TURBO_TOKEN }}
jobs:
benchmark-tiny:
name: Benchmark Rust Crates (tiny)
runs-on: ['self-hosted', 'linux', 'x64', 'metal']
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: ./.github/actions/setup-rust
- name: Install cargo-codspeed
uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed@2.10.1
- name: Build the benchmark target(s)
run: cargo codspeed build -p next-api
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
benchmark-small-apps:
name: Benchmark Rust Crates (small apps)
runs-on: ['self-hosted', 'linux', 'x64', 'metal']
......
......@@ -1083,6 +1083,7 @@ dependencies = [
"anstyle",
"clap_lex",
"strsim 0.11.1",
"terminal_size",
]
[[package]]
......@@ -1173,6 +1174,46 @@ dependencies = [
"walkdir",
]
[[package]]
name = "codspeed-divan-compat"
version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8620a09dfaf37b3c45f982c4b65bd8f9b0203944da3ffa705c0fcae6b84655ff"
dependencies = [
"codspeed",
"codspeed-divan-compat-macros",
"codspeed-divan-compat-walltime",
]
[[package]]
name = "codspeed-divan-compat-macros"
version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30fe872bc4214626b35d3a1706a905d0243503bb6ba3bb7be2fc59083d5d680c"
dependencies = [
"divan-macros",
"itertools 0.14.0",
"proc-macro-crate 3.3.0",
"proc-macro2",
"quote",
"syn 2.0.100",
]
[[package]]
name = "codspeed-divan-compat-walltime"
version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "104caa97b36d4092d89e24e4b103b40ede1edab03c0372d19e14a33f9393132b"
dependencies = [
"cfg-if",
"clap",
"codspeed",
"condtype",
"divan-macros",
"libc",
"regex-lite",
]
[[package]]
name = "color_quant"
version = "1.1.0"
......@@ -1227,6 +1268,12 @@ dependencies = [
"crossbeam-utils",
]
[[package]]
name = "condtype"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf0a07a401f374238ab8e2f11a104d2851bf9ce711ec69804834de8af45c7af"
[[package]]
name = "console"
version = "0.15.10"
......@@ -1937,6 +1984,17 @@ dependencies = [
"syn 2.0.100",
]
[[package]]
name = "divan-macros"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8dc51d98e636f5e3b0759a39257458b22619cac7e96d932da6eeb052891bb67c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
]
[[package]]
name = "document-features"
version = "0.2.10"
......@@ -2693,7 +2751,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
"socket2 0.4.9",
"socket2 0.5.10",
"tokio",
"tower-service",
"tracing",
......@@ -3232,6 +3290,15 @@ dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "1.0.9"
......@@ -4144,6 +4211,7 @@ name = "next-api"
version = "0.1.0"
dependencies = [
"anyhow",
"codspeed-divan-compat",
"either",
"futures",
"indexmap 2.7.1",
......@@ -4153,12 +4221,16 @@ dependencies = [
"serde",
"serde_json",
"swc_core",
"tempfile",
"tokio",
"tracing",
"turbo-rcstr",
"turbo-tasks",
"turbo-tasks-backend",
"turbo-tasks-build",
"turbo-tasks-env",
"turbo-tasks-fs",
"turbo-tasks-malloc",
"turbopack",
"turbopack-browser",
"turbopack-core",
......@@ -4527,7 +4599,7 @@ version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
dependencies = [
"proc-macro-crate",
"proc-macro-crate 1.3.1",
"proc-macro2",
"quote",
"syn 1.0.109",
......@@ -5139,6 +5211,15 @@ dependencies = [
"toml_edit 0.19.15",
]
[[package]]
name = "proc-macro-crate"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35"
dependencies = [
"toml_edit 0.22.27",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
......@@ -5657,6 +5738,12 @@ dependencies = [
"regex-syntax 0.8.5",
]
[[package]]
name = "regex-lite"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
[[package]]
name = "regex-syntax"
version = "0.6.29"
......@@ -8720,22 +8807,22 @@ dependencies = [
[[package]]
name = "toml"
version = "0.8.19"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
checksum = "c6a4b9e8023eb94392d3dca65d717c53abc5dad49c07cb65bb8fcd87115fa325"
dependencies = [
"indexmap 2.7.1",
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit 0.22.20",
"toml_edit 0.21.1",
]
[[package]]
name = "toml_datetime"
version = "0.6.8"
version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
dependencies = [
"serde",
]
......@@ -8755,15 +8842,26 @@ dependencies = [
[[package]]
name = "toml_edit"
version = "0.22.20"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d"
checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
dependencies = [
"indexmap 2.7.1",
"serde",
"serde_spanned",
"toml_datetime",
"winnow 0.6.18",
"winnow 0.5.15",
]
[[package]]
name = "toml_edit"
version = "0.22.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
dependencies = [
"indexmap 2.7.1",
"toml_datetime",
"winnow 0.7.11",
]
[[package]]
......@@ -8952,7 +9050,7 @@ dependencies = [
"serde_json",
"target-triple",
"termcolor",
"toml 0.8.19",
"toml 0.8.9",
]
[[package]]
......@@ -10704,7 +10802,7 @@ dependencies = [
"serde_json",
"serde_yml",
"thiserror 1.0.69",
"toml 0.8.19",
"toml 0.8.9",
"url",
]
......@@ -10769,7 +10867,7 @@ dependencies = [
"tar",
"tempfile",
"thiserror 1.0.69",
"toml 0.8.19",
"toml 0.8.9",
"url",
"wasmer-config",
"wasmer-types",
......@@ -10874,7 +10972,7 @@ dependencies = [
"thiserror 1.0.69",
"tokio",
"tokio-stream",
"toml 0.8.19",
"toml 0.8.9",
"tracing",
"url",
"urlencoding",
......@@ -11389,9 +11487,9 @@ dependencies = [
[[package]]
name = "winnow"
version = "0.6.18"
version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f"
checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd"
dependencies = [
"memchr",
]
......
......@@ -336,6 +336,7 @@ criterion = { package = "codspeed-criterion-compat", version = "2.10.1" }
crossbeam-channel = "0.5.8"
dashmap = "6.1.0"
data-encoding = "2.3.3"
divan = { version = "2.10.1", package = "codspeed-divan-compat" }
dhat = { version = "0.3.2" }
dunce = "1.0.3"
either = "1.9.0"
......
......@@ -9,6 +9,10 @@ autobenches = false
[lib]
bench = false
[[bench]]
name = "hmr"
harness = false
[lints]
workspace = true
......@@ -25,7 +29,7 @@ serde_json = { workspace = true }
swc_core = { workspace = true }
tracing = { workspace = true }
turbo-rcstr = { workspace = true }
turbo-tasks = { workspace = true }
turbo-tasks = { workspace = true, features = ["non_operation_vc_strongly_consistent"] }
turbo-tasks-env = { workspace = true }
turbo-tasks-fs = { workspace = true }
turbopack = { workspace = true }
......@@ -36,6 +40,14 @@ turbopack-node = { workspace = true }
turbopack-nodejs = { workspace = true }
turbopack-wasm = { workspace = true }
[dev-dependencies]
turbo-tasks-malloc = { workspace = true }
divan = { workspace = true }
tokio = { workspace = true }
tempfile = { workspace = true }
turbo-tasks-backend = { workspace = true }
[build-dependencies]
anyhow = { workspace = true }
turbo-tasks-build = { workspace = true }
......
extern crate turbo_tasks_malloc;
use std::{
fs::{create_dir_all, write},
mem::forget,
path::{Path, PathBuf},
process::Command,
sync::Arc,
time::{Duration, Instant},
};
use anyhow::{Context, Result};
use next_api::{
project::{DefineEnv, DraftModeOptions, ProjectContainer, ProjectOptions, WatchOptions},
register,
route::endpoint_write_to_disk,
};
use serde_json::json;
use tempfile::TempDir;
use tokio::runtime::Runtime;
use turbo_rcstr::RcStr;
use turbo_tasks::{
TransientInstance, TurboTasks, TurboTasksApi, Vc, backend::Backend, trace::TraceRawVcs,
};
use turbo_tasks_backend::noop_backing_storage;
pub struct HmrBenchmark {
test_app: TestApp,
project_container: Vc<ProjectContainer>,
}
#[derive(Debug)]
pub struct TestApp {
_path: PathBuf,
/// Prevent temp directory from being dropped
_dir: TempDir,
modules: Vec<(PathBuf, usize)>,
}
impl TestApp {
pub fn path(&self) -> &Path {
&self._path
}
pub fn modules(&self) -> &[(PathBuf, usize)] {
&self.modules
}
}
fn create_test_app(module_count: usize) -> Result<TestApp> {
let temp_dir = tempfile::tempdir().context("Failed to create temp directory")?;
let base_path = temp_dir.path().to_path_buf();
// Create basic Next.js structure
let pages_dir = base_path.join("pages");
let app_dir = base_path.join("app");
let src_dir = base_path.join("src");
create_dir_all(&pages_dir)?;
create_dir_all(&app_dir)?;
create_dir_all(&src_dir)?;
let mut modules = Vec::new();
// Create index page
let index_content = r#"import React from 'react';
export default function Home() {
return <div>Hello World</div>;
}
"#;
let index_path = pages_dir.join("index.js");
write(&index_path, index_content)?;
modules.push((index_path, 0));
// Create app layout
let layout_content = r#"export default function RootLayout({ children }) {
return (
<html>
<body>{children}</body>
</html>
);
}
"#;
let layout_path = app_dir.join("layout.js");
write(&layout_path, layout_content)?;
modules.push((layout_path, 0));
// Create app page
let app_page_content = r#"export default function Page() {
return <div>App Router Page</div>;
}
"#;
let app_page_path = app_dir.join("page.js");
write(&app_page_path, app_page_content)?;
modules.push((app_page_path, 0));
// Create additional modules based on module_count
for i in 3..module_count {
let component_content = format!(
r#"import React from 'react';
export default function Component{i}() {{
return <div>Component {i}</div>;
}}
"#
);
let component_path = src_dir.join(format!("component{i}.js"));
write(&component_path, component_content)?;
modules.push((component_path, 1));
}
// Create package.json
let package_json = r#"{
"name": "hmr-test-app",
"version": "1.0.0",
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "^15.0.0"
}
}
"#;
write(base_path.join("package.json"), package_json)?;
// Create next.config.js
let next_config = "module.exports = {}";
write(base_path.join("next.config.js"), next_config)?;
// Run `npm install`
let output = Command::new("npm")
.current_dir(&base_path)
.args(["install"])
.output()?;
if !output.status.success() {
return Err(anyhow::anyhow!("Failed to run `npm install`"));
}
Ok(TestApp {
_path: base_path,
_dir: temp_dir,
modules,
})
}
fn load_next_config() -> RcStr {
serde_json::to_string(&json!({
"sassOptions": {
},
}))
.unwrap()
.into()
}
fn runtime() -> Runtime {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.on_thread_stop(|| {
turbo_tasks_malloc::TurboMalloc::thread_stop();
})
.build()
.context("Failed to build tokio runtime")
.unwrap()
}
impl HmrBenchmark {
pub async fn new(module_count: usize) -> Result<Self> {
let test_app = create_test_app(module_count)?;
let project_container = {
let container = ProjectContainer::new(RcStr::from("hmr-benchmark"), true)
.to_resolved()
.await?;
let project_path = test_app.path().to_string_lossy().to_string();
let root_path = test_app.path().to_string_lossy().to_string();
let options = ProjectOptions {
root_path: RcStr::from(root_path),
project_path: RcStr::from(project_path.clone()),
next_config: load_next_config(),
js_config: RcStr::from("{}"),
env: vec![],
define_env: DefineEnv {
client: vec![],
edge: vec![],
nodejs: vec![],
},
watch: WatchOptions {
enable: true,
poll_interval: None,
},
dev: true,
encryption_key: RcStr::from("test-key"),
build_id: RcStr::from("development"),
preview_props: DraftModeOptions {
preview_mode_id: RcStr::from("development"),
preview_mode_encryption_key: RcStr::from("test-key"),
preview_mode_signing_key: RcStr::from("test-key"),
},
browserslist_query: RcStr::from("last 2 versions"),
no_mangling: false,
};
container.initialize(options).await?;
Ok::<_, anyhow::Error>(container)
}?;
Ok(Self {
test_app,
project_container: *project_container,
})
}
/// Simulate file changes for HMR testing
pub fn make_file_change(&self, file_path: &Path, change_id: usize) -> Result<()> {
let mut content =
std::fs::read_to_string(file_path).context("Failed to read file content")?;
// Add a comment with a unique identifier to trigger HMR
let change_marker = format!("// HMR_CHANGE_{change_id}\n");
content.push_str(&change_marker);
std::fs::write(file_path, content).context("Failed to write modified content")?;
Ok(())
}
/// Benchmark HMR update detection and processing
pub async fn benchmark_hmr_update(&self, num_updates: usize) -> Result<Duration> {
let start_time = Instant::now();
// Get entrypoints to trigger initial compilation
let entrypoints = self.project_container.entrypoints();
let initial_result = entrypoints.await?;
// Check if we have routes available
if initial_result.routes.is_empty() {
return Err(anyhow::anyhow!("No routes found in entrypoints"));
}
// Get HMR identifiers
let hmr_identifiers = self.project_container.hmr_identifiers();
let identifiers = hmr_identifiers.await?;
if identifiers.is_empty() {
return Err(anyhow::anyhow!("No HMR identifiers found"));
}
// Get project to access HMR methods
let project = self.project_container.project();
// Create multiple sessions to simulate real HMR usage
let mut update_durations = Vec::new();
for i in 0..num_updates {
let update_start = Instant::now();
// Use different identifiers for each update
let identifier = &identifiers[i % identifiers.len()];
// Get version state for this update
let session = TransientInstance::new(());
let version_state = project.hmr_version_state(identifier.clone(), session);
// Pick a module file to change
let module_index = i % self.test_app.modules().len();
let (module_path, _) = &self.test_app.modules()[module_index];
// Make a file change
self.make_file_change(module_path, i)?;
// Wait for HMR update and measure time
let _update_result = project
.hmr_update(identifier.clone(), version_state)
.await?;
update_durations.push(update_start.elapsed());
}
// // Log individual update times for analysis
// for (i, duration) in update_durations.iter().enumerate() {
// println!("HMR update {} took: {:?}", i + 1, duration);
// }
Ok(start_time.elapsed())
}
/// Benchmark HMR subscription and event handling
pub async fn benchmark_hmr_subscription(&self) -> Result<Duration> {
let start_time = Instant::now();
// Get entrypoints first
let entrypoints = self.project_container.entrypoints();
let _initial_result = entrypoints.await?;
// Get HMR identifiers
let hmr_identifiers = self.project_container.hmr_identifiers();
let identifiers = hmr_identifiers.await?;
if identifiers.is_empty() {
return Err(anyhow::anyhow!("No HMR identifiers found"));
}
let project = self.project_container.project();
// Test subscription to multiple identifiers
let mut version_states = Vec::new();
for identifier in identifiers.iter().take(5) {
// Test with first 5 identifiers
let session = TransientInstance::new(());
let version_state = project.hmr_version_state(identifier.clone(), session);
version_states.push((identifier.clone(), version_state));
}
// Simulate multiple rapid updates
for (i, (identifier, version_state)) in version_states.iter().enumerate() {
// Make a file change
if let Some((module_path, _)) = self.test_app.modules().get(i) {
self.make_file_change(module_path, i * 100)?;
// Check for update
let _update_result = project
.hmr_update(identifier.clone(), *version_state)
.await?;
}
}
Ok(start_time.elapsed())
}
/// Benchmark initial project setup and entrypoint detection
pub async fn benchmark_initial_compilation(&self) -> Result<Duration> {
let start_time = Instant::now();
let entrypoints = self.project_container.entrypoints();
let result = entrypoints.await?;
for route in result.routes.values() {
match route {
next_api::route::Route::Page {
html_endpoint,
data_endpoint,
} => {
let _ = endpoint_write_to_disk(**html_endpoint).await?;
let _ = endpoint_write_to_disk(**data_endpoint).await?;
}
next_api::route::Route::PageApi { endpoint } => {
let _ = endpoint_write_to_disk(**endpoint).await?;
}
next_api::route::Route::AppPage(app_page_routes) => {
for route in app_page_routes.iter() {
let _ = endpoint_write_to_disk(*route.html_endpoint).await?;
let _ = endpoint_write_to_disk(*route.rsc_endpoint).await?;
}
}
next_api::route::Route::AppRoute { endpoint, .. } => {
let _ = endpoint_write_to_disk(**endpoint).await?;
}
next_api::route::Route::Conflict => {}
}
}
Ok(start_time.elapsed())
}
/// Get the number of modules in the test app
pub fn module_count(&self) -> usize {
self.test_app.modules().len()
}
}
async fn setup_benchmark(module_count: usize) -> HmrBenchmark {
register();
HmrBenchmark::new(module_count).await.unwrap()
}
fn setup_runtime() -> Runtime {
runtime()
}
fn setup_turbo_tasks() -> Arc<TurboTasks<impl Backend>> {
TurboTasks::new(turbo_tasks_backend::TurboTasksBackend::new(
turbo_tasks_backend::BackendOptions {
storage_mode: None,
dependency_tracking: true,
..Default::default()
},
noop_backing_storage(),
))
}
#[derive(TraceRawVcs)]
struct Setup {
#[turbo_tasks(trace_ignore)]
rt: Arc<Runtime>,
#[turbo_tasks(trace_ignore)]
tt: Arc<dyn TurboTasksApi>,
#[turbo_tasks(trace_ignore)]
benchmark: HmrBenchmark,
}
fn setup_everything(module_count: usize) -> Arc<Setup> {
let rt = Arc::new(setup_runtime());
let tt = setup_turbo_tasks();
let arc = rt.clone().block_on(async move {
tt.clone()
.run_once(async move {
let benchmark = setup_benchmark(module_count).await;
benchmark.benchmark_initial_compilation().await.unwrap();
Ok(Arc::new(Setup { rt, tt, benchmark }))
})
.await
.unwrap()
});
// I don't know why this is needed, but it is required to avoid dropping tokio runtime from
// async scope
forget(arc.clone());
arc
}
#[divan::bench]
fn hmr_initial_compilation(bencher: divan::Bencher) {
let setup = setup_everything(100);
bencher.with_inputs(|| setup.clone()).bench_values(|setup| {
setup.clone().rt.block_on(async move {
setup.clone().tt.run_once(Box::pin(async move {
setup
.benchmark
.benchmark_initial_compilation()
.await
.unwrap();
Ok(())
}));
})
});
}
#[divan::bench(sample_size = 10)]
fn hmr_updates_small_5(bencher: divan::Bencher) {
let setup = setup_everything(100);
bencher.with_inputs(|| setup.clone()).bench_values(|setup| {
setup.clone().rt.block_on(async move {
setup.clone().tt.run_once(Box::pin(async move {
let _ = setup
.benchmark
.benchmark_initial_compilation()
.await
.unwrap();
setup.benchmark.benchmark_hmr_update(5).await.unwrap();
Ok(())
}));
})
});
}
#[divan::bench(sample_size = 10)]
fn hmr_updates_medium_10(bencher: divan::Bencher) {
let setup = setup_everything(200);
bencher.with_inputs(|| setup.clone()).bench_values(|setup| {
setup.clone().rt.block_on(async move {
setup.clone().tt.run_once(Box::pin(async move {
let _ = setup
.benchmark
.benchmark_initial_compilation()
.await
.unwrap();
setup.benchmark.benchmark_hmr_update(10).await.unwrap();
Ok(())
}));
})
});
}
#[divan::bench(sample_size = 10)]
fn hmr_updates_large_20(bencher: divan::Bencher) {
let setup = setup_everything(500);
bencher.with_inputs(|| setup.clone()).bench_values(|setup| {
setup.clone().rt.block_on(async move {
setup.clone().tt.run_once(Box::pin(async move {
let _ = setup
.benchmark
.benchmark_initial_compilation()
.await
.unwrap();
setup.benchmark.benchmark_hmr_update(20).await.unwrap();
Ok(())
}));
})
});
}
#[divan::bench(sample_size = 10)]
fn hmr_subscription(bencher: divan::Bencher) {
let setup = setup_everything(100);
bencher.with_inputs(|| setup.clone()).bench_values(|setup| {
setup.clone().rt.block_on(async move {
setup.clone().tt.run_once(Box::pin(async move {
let _ = setup
.benchmark
.benchmark_initial_compilation()
.await
.unwrap();
setup.benchmark.benchmark_hmr_subscription().await.unwrap();
Ok(())
}));
})
});
}
fn main() {
divan::main();
}
......@@ -62,7 +62,7 @@ impl Default for CacheKinds {
#[turbo_tasks::value(serialization = "custom", eq = "manual")]
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, OperationValue)]
#[serde(rename_all = "camelCase")]
#[serde(default, rename_all = "camelCase")]
pub struct NextConfig {
// TODO all fields should be private and access should be wrapped within a turbo-tasks function
// Otherwise changing NextConfig will lead to invalidating all tasks accessing it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment