Skip to content

chore(ui): reduce prod deps#8955

Open
avivkeller wants to merge 3 commits into
mainfrom
reduce-production-deps
Open

chore(ui): reduce prod deps#8955
avivkeller wants to merge 3 commits into
mainfrom
reduce-production-deps

Conversation

@avivkeller

@avivkeller avivkeller commented Jun 10, 2026

Copy link
Copy Markdown
Member

This PR reduces the number of dependencies needed in @node-core/ui-components during production by moving the building of @node-core/ui-components to an activity done during the building of the site, and changing the site to install development dependencies when building.

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

Size of @node-core/ui-components currently: 92MB
Size after this PR (est): 10MB

@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 Error Error Jun 10, 2026 5:49pm

Request Review

@cursor

cursor Bot commented Jun 10, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes Vercel/CI install and monorepo build ordering for a core UI package; misconfiguration could break deploys or styling, but no auth or data-path changes.

Overview
Shrinks @node-core/ui-components production footprint by moving Tailwind, PostCSS, and TypeScript tooling into devDependencies, and making the site build compile the package via Turbo ^build on dev, test:unit, and Cloudflare worker tasks instead of shipping those tools as runtime deps.

Build/deploy wiring: Root and package compile scripts/tasks are removed in favor of build (rehype-shiki, ui-components, README). Vercel and CI drop --prod / install-flags: --prod so dev deps are installed when the site builds. @node-core/ui-components is bumped to 1.7.1 with export map changes: types resolve to src, default imports to dist, plus an explicit ./src/* export.

Site styling: apps/site/styles/index.css now @imports tailwindcss and @node-core/ui-components/src/styles/index.css; Korean locale rules move in from deleted locales.css. Stylelint points at the src/stylelint plugin path.

Reviewed by Cursor Bugbot for commit 5e1314c. 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.38%. Comparing base (e35206c) to head (5e1314c).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8955      +/-   ##
==========================================
- Coverage   75.70%   75.38%   -0.32%     
==========================================
  Files         102       98       -4     
  Lines        8676     8630      -46     
  Branches      321      318       -3     
==========================================
- Hits         6568     6506      -62     
- Misses       2105     2120      +15     
- 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

@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 ad9ae44. Configure here.

Comment thread apps/site/turbo.json
"tasks": {
"dev": {
"dependsOn": ["build:blog-data"],
"dependsOn": ["build:blog-data", "build:twoslash-fsmap", "^build"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Deploy task omits dependency build

Medium Severity

The site deploy Turbo task does not depend on ^build, unlike build and dev. With @node-core/ui-components default exports now targeting dist, running pnpm deploy alone can start Next before dist exists and fail module resolution.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ad9ae44. Configure here.

@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?

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.

2 participants