Skip to content

chore(ui): reduce prod deps#8955

Merged
avivkeller merged 4 commits into
mainfrom
reduce-production-deps
Jun 20, 2026
Merged

chore(ui): reduce prod deps#8955
avivkeller merged 4 commits into
mainfrom
reduce-production-deps

Conversation

@avivkeller

@avivkeller avivkeller commented Jun 10, 2026

Copy link
Copy Markdown
Member

This PR makes @node-core/ui-components ship a precompiled dist/ and consume it from the site, instead of the site transpiling the package's raw source. As a result, the package's build-only tooling (typescript, tailwindcss, postcss-*, @tailwindcss/postcss, @types/react) moves from dependencies to devDependencies, where it belongs.

@avivkeller avivkeller requested review from a team as code owners June 10, 2026 17:22
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Jun 20, 2026 3:41pm

Request Review

@cursor

cursor Bot commented Jun 10, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes package export resolution and install/build ordering for the main site; a missed ^build or prod-only install would break builds, but behavior is largely packaging and pipeline wiring.

Overview
@node-core/ui-components now resolves runtime imports to precompiled dist/ instead of raw src/, with package compile scripts renamed to build across the monorepo (including rehype-shiki). Tailwind/PostCSS/TypeScript and related tooling move from dependencies to devDependencies in ui-components (1.7.1), and root compile is removed in favor of turbo build.

The site pulls tailwindcss directly in styles/index.css, imports ui styles from @node-core/ui-components/src/styles, inlines Korean locale typography rules ( locales.css removed), and points Stylelint at the src/stylelint plugin path. Turbo tasks for dev, tests, and Cloudflare now depend on ^build so workspace packages build first; root build declares dist/** outputs.

CI and Vercel drop --prod on pnpm install so devDependencies needed to build ui-components are installed in deploy/build pipelines.

Reviewed by Cursor Bugbot for commit 578e281. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread packages/ui-components/package.json
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.35%. Comparing base (e3dbfbb) to head (578e281).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8955      +/-   ##
==========================================
- Coverage   75.70%   75.35%   -0.35%     
==========================================
  Files         102       98       -4     
  Lines        8676     8630      -46     
  Branches      321      319       -2     
==========================================
- Hits         6568     6503      -65     
- Misses       2105     2123      +18     
- Partials        3        4       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Comment thread packages/ui-components/package.json
Comment thread packages/ui-components/package.json
Comment thread apps/site/turbo.json
@MattIPv4

Copy link
Copy Markdown
Member

cc @nodejs/web-infra this changes our vercel.json to install development dependencies

Can we make sure that post-build, we prune back to just production runtime dependencies?

@avivkeller

Copy link
Copy Markdown
Member Author

I believe vercel does that post-build anyway, it only ships the built .next folder, right?

@MattIPv4

Copy link
Copy Markdown
Member

Does it bundle everything for server-side logic too?

@avivkeller

Copy link
Copy Markdown
Member Author

Does it bundle everything for server-side logic too?

This change pre-bundles @node-core/ui-components, which is used by both the client and the server

@MattIPv4

Copy link
Copy Markdown
Member

Right, but I don't really want any dev deps hanging around in node_modules after we've done the initial build

@avivkeller

Copy link
Copy Markdown
Member Author

Right, but I don't really want any dev deps hanging around in node_modules after we've done the initial build

It shouldn't matter what's in node_modules, right? Doesn't Vercel/Open-Next not ship node_modules? Don't they only ship the output of build?

@MattIPv4

Copy link
Copy Markdown
Member

That's what I was asking, to check that it is just that output that's used, and that node_modules doesn't persist for server-side dependencies 🤔

@avivkeller

avivkeller commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Ahh sorry if I misunderstood. No, node_modules is not preserved, even on the server. In fact, we actually explicitly need to mark the modules which we want to preserve on the server side (which we do for @types/node for typings). I've double-checked this to confirm.

@avivkeller avivkeller requested a review from MattIPv4 June 12, 2026 20:54
@avivkeller

Copy link
Copy Markdown
Member Author

FYI @nodejs/web-infra

@MattIPv4 MattIPv4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems fine, but I would appreciate a second review from @nodejs/web-infra on this

@avivkeller avivkeller added this pull request to the merge queue Jun 16, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 16, 2026
@avivkeller avivkeller added this pull request to the merge queue Jun 16, 2026
@avivkeller avivkeller removed this pull request from the merge queue due to a manual request Jun 16, 2026
@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Jun 16, 2026
@github-actions github-actions Bot removed the github_actions:pull-request Trigger Pull Request Checks label Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟠 76 🟢 96 🟢 96 🟢 100 🔗
/en/about 🟢 100 🟢 94 🟢 96 🟠 88 🔗
/en/about/previous-releases 🟢 98 🟢 97 🟢 96 🟢 100 🔗
/en/download 🟢 98 🟢 96 🟠 81 🟢 100 🔗
/en/download/archive/current 🟢 100 🟢 97 🟢 100 🟢 100 🔗
/en/blog 🟢 99 🟢 97 🟢 96 🟢 100 🔗

@avivkeller avivkeller added this pull request to the merge queue Jun 20, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 20, 2026
@avivkeller avivkeller force-pushed the reduce-production-deps branch from 5e1314c to 1f8416b Compare June 20, 2026 15:34
@avivkeller

Copy link
Copy Markdown
Member Author

Hmmm, maybe a rebase will fix this Chromatic issue?

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 578e281. Configure here.

Comment thread apps/site/styles/index.css
@avivkeller avivkeller added this pull request to the merge queue Jun 20, 2026
Merged via the queue into main with commit fb6f828 Jun 20, 2026
15 checks passed
@avivkeller avivkeller deleted the reduce-production-deps branch June 20, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants