Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/next-core/src/next_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ pub struct NextConfig {
compress: bool,
eslint: EslintConfig,
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,
http_agent_options: HttpAgentConfig,
on_demand_entries: OnDemandEntriesConfig,
Expand All @@ -156,7 +152,11 @@ pub struct NextConfig {
typescript: TypeScriptConfig,
use_file_system_public_routes: bool,
cache_components: Option<bool>,
webpack: Option<serde_json::Value>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this was silly.

//
// 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]
Expand Down
7 changes: 3 additions & 4 deletions packages/next/src/build/swc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,11 +852,10 @@ function bindingToApi(
// Avoid mutating the existing `nextConfig` object. NOTE: This is only a shallow clone.
let nextConfigSerializable: Record<string, any> = { ...nextConfig }

nextConfigSerializable.generateBuildId =
await nextConfigSerializable.generateBuildId?.()

// TODO: these functions takes arguments, have to be supported in a different way
// These values are never read by Turbopack and are potentially non-serializable.
nextConfigSerializable.exportPathMap = {}
nextConfigSerializable.generateBuildId =
nextConfigSerializable.generateBuildId && {}
nextConfigSerializable.webpack = nextConfigSerializable.webpack && {}

if (nextConfigSerializable.modularizeImports) {
Expand Down
Loading