Unverified Commit 6eed9a05 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: don't generateBuildId in dev (#86581)

parent bfb4a8c9
...@@ -141,10 +141,6 @@ pub struct NextConfig { ...@@ -141,10 +141,6 @@ pub struct NextConfig {
compress: bool, compress: bool,
eslint: EslintConfig, eslint: EslintConfig,
exclude_default_moment_locales: bool, exclude_default_moment_locales: bool,
// this can be a function in js land
export_path_map: Option<serde_json::Value>,
// this is a function in js land
generate_build_id: Option<serde_json::Value>,
generate_etags: bool, generate_etags: bool,
http_agent_options: HttpAgentConfig, http_agent_options: HttpAgentConfig,
on_demand_entries: OnDemandEntriesConfig, on_demand_entries: OnDemandEntriesConfig,
...@@ -156,7 +152,11 @@ pub struct NextConfig { ...@@ -156,7 +152,11 @@ pub struct NextConfig {
typescript: TypeScriptConfig, typescript: TypeScriptConfig,
use_file_system_public_routes: bool, use_file_system_public_routes: bool,
cache_components: Option<bool>, cache_components: Option<bool>,
webpack: Option<serde_json::Value>, //
// These are never used by Turbopack, and potentially non-serializable anyway:
// export_path_map: Option<serde_json::Value>,
// generate_build_id: Option<serde_json::Value>,
// webpack: Option<serde_json::Value>,
} }
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
......
...@@ -852,11 +852,10 @@ function bindingToApi( ...@@ -852,11 +852,10 @@ function bindingToApi(
// Avoid mutating the existing `nextConfig` object. NOTE: This is only a shallow clone. // Avoid mutating the existing `nextConfig` object. NOTE: This is only a shallow clone.
let nextConfigSerializable: Record<string, any> = { ...nextConfig } let nextConfigSerializable: Record<string, any> = { ...nextConfig }
nextConfigSerializable.generateBuildId = // These values are never read by Turbopack and are potentially non-serializable.
await nextConfigSerializable.generateBuildId?.()
// TODO: these functions takes arguments, have to be supported in a different way
nextConfigSerializable.exportPathMap = {} nextConfigSerializable.exportPathMap = {}
nextConfigSerializable.generateBuildId =
nextConfigSerializable.generateBuildId && {}
nextConfigSerializable.webpack = nextConfigSerializable.webpack && {} nextConfigSerializable.webpack = nextConfigSerializable.webpack && {}
if (nextConfigSerializable.modularizeImports) { if (nextConfigSerializable.modularizeImports) {
......
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