Title: fix(config): drop three dead next.config entries and correct two stale comments by waleedlatif1 · Pull Request #6076 · simstudioai/sim · GitHub
Open Graph Title: fix(config): drop three dead next.config entries and correct two stale comments by waleedlatif1 · Pull Request #6076 · simstudioai/sim
X Title: fix(config): drop three dead next.config entries and correct two stale comments by waleedlatif1 · Pull Request #6076 · simstudioai/sim
Description: Summary Three entries in apps/sim/next.config.ts were inert. Removing them is behavior-neutral. Also corrects two comments that claimed more than the code does. This came out of an audit of build-speed levers. None of these is a performance fix — they are hygiene, and I'd rather say so than imply a win that isn't there. The optimizePackageImports finding The Next 16.2.11 docs state, verbatim: "Turbopack automatically analyzes imports and optimizes them. It does not require this configuration." That sentence is not backed by the code. At tag v16.2.11: crates/next-core/src/next_client/context.rs:362 and next_server/context.rs:586 — the list feeds side_effect_free_packages next_server/context.rs:167 — the list is force-appended to transpiled_packages, and :191 then removes those entries from the server externals set turbopack-ecmascript/src/chunk/placeable.rs:235 — the glob short-circuits ahead of each package's own package.json sideEffects field. It is an override, not a hint. Next's own turbopack-warning.js also does not list the option as Turbopack-unsupported. So a stale entry is not free: it costs transform work and silently overrides a package's sideEffects declaration. What was removed Entry Why it's dead lodash (optimizePackageImports) Zero import sites repo-wide, and not a dependency of any package here. Next already applies a lodash → lodash/{{member}} modularizeImports rule unconditionally. @radix-ui/react-accordion (same) Zero import sites — its only occurrence in the repo was this config line. Present in node_modules only via transitive hoisting. prettier (transpilePackages) Nothing imports it, it's in no package.json, and the repo formats with Biome. transpilePackages matches modules already in the graph, so this transpiled nothing. What was deliberately left alone zod, reactflow, framer-motion, streamdown — real barrels with real import sites (zod has 389). Removing them removes genuine side_effect_free_packages tree-shaking hints and could grow the client bundle. That's a measurable tradeoff, not a cleanup. The 8 remaining @radix-ui/react-* entries — each is a 2-file pre-bundled package, outside the option's documented purpose ("hundreds or thousands of modules"), so they're likely noise plus sideEffects-override risk. But they are imported, so removal is a bundle-size question. Deferred on purpose. @react-email/* and @t3-oss/* in transpilePackages — these are where real transform work happens, and all four ship prebuilt JS meeting no documented criterion. Not touched: they were added empirically to fix real bugs, and the @t3-oss failure mode is silently-undefined client env, which ships unnoticed. The whole transpilePackages array must stay non-empty. webpack-config.js gates shouldIncludeExternalDirs on !!config.transpilePackages, so emptying it would break dev:webpack compiling packages/*/src. Individual removals are fine. Comment corrections The .map header rule was labelled "Block access to sourcemap files (defense in depth)". It sets x-robots-tag: noindex and a TTL — it blocks nothing, and the maps ship publicly in the production image (docker/app.Dockerfile:107). The minimal-registry comment was stale and causally wrong. Measured today: 4,351 tool entries (not ~247) pulling ~5,907 modules (not ~2,074); BLOCK_REGISTRY is 313. Blocks are not a co-equal cost — blocks/registry-maps alone is ~349 modules and mostly rides in behind the tool registry. And the registry is reached via four redundant client-reachable edges, not just providers/utils → tools/params, which is why cutting that one edge buys a single module. Type of Change Improvement (hygiene / comment accuracy) Testing tsc --noEmit clean (exit 0), biome check clean. Config-only change with no runtime code touched; the removed entries were inert by the mechanisms cited above. The CI Build App check exercises the real build.
Open Graph Description: Summary Three entries in apps/sim/next.config.ts were inert. Removing them is behavior-neutral. Also corrects two comments that claimed more than the code does. This came out of an audit of build-s...
X Description: Summary Three entries in apps/sim/next.config.ts were inert. Removing them is behavior-neutral. Also corrects two comments that claimed more than the code does. This came out of an audit of build-s...
Opengraph URL: https://github.com/simstudioai/sim/pull/6076
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:47bc92e0-1430-8b77-60e6-21c539d973ba |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DA52:2413E8:4CFBAE:6EA482:6AFB3B68 |
| html-safe-nonce | 26e086107fc9baded7b2a519a23f3488f786d83f488ce5ec3953299217f57c29 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTUyOjI0MTNFODo0Q0ZCQUU6NkVBNDgyOjZBRkIzQjY4IiwidmlzaXRvcl9pZCI6IjgzNjUzNjg2NTk2MDU2NjY2NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 53a152feca3b7fe74b73d681593dbb1e8d7476aa59c8956ef1702f244bb455ce |
| hovercard-subject-tag | pull_request:4165262164 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6076/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Three entries in apps/sim/next.config.ts were inert. Removing them is behavior-neutral. Also corrects two comments that claimed more than the code does. This came out of an audit of build-s... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2169b0dfbef67ed6b128074a5ed45bb7d5d1859783b10178b09a7765ad5f3693 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b4fc8df5ef1c6757e733a23e6b81b6725021823 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width