Skip to content

perf(deps): externalize lodash-es via shared to reduce install size#3292

Merged
SoonIter merged 1 commit intomainfrom
vk/a775-lodash-es-depend
Apr 8, 2026
Merged

perf(deps): externalize lodash-es via shared to reduce install size#3292
SoonIter merged 1 commit intomainfrom
vk/a775-lodash-es-depend

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Apr 8, 2026

Summary

  • move lodash-es out of @rspress/core runtime dependencies
  • add @rspress/shared/lodash-es and route existing lodash imports through the shared entry
  • update the changeset and lockfile for the dependency move

Testing

  • pnpm --filter @rspress/shared build
  • pnpm --filter @rspress/core build

Copilot AI review requested due to automatic review settings April 8, 2026 07:25
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 8, 2026

Deploying rspress-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: c0de952
Status: ✅  Deploy successful!
Preview URL: https://205318a1.rspress-v2.pages.dev
Branch Preview URL: https://vk-a775-lodash-es-depend.rspress-v2.pages.dev

View logs

@SoonIter SoonIter changed the title chore(deps): externalize lodash-es via shared perf(deps): externalize lodash-es via shared Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR routes all lodash-es usage through a new @rspress/shared/lodash-es entrypoint and removes lodash-es as a runtime dependency from @rspress/core.

Changes:

  • Added @rspress/shared/lodash-es entrypoint and updated @rspress/core imports to consume it.
  • Adjusted @rspress/shared build/export config to publish the new subpath.
  • Updated dependencies/changeset to reflect moving lodash-es out of @rspress/core.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/shared/src/node-utils/merge.ts Switches from dynamic lodash-es import to shared entrypoint import.
packages/shared/src/lodash-es.ts Introduces the new re-exporting shared lodash-es facade.
packages/shared/rslib.config.ts Adds a build entry for the new lodash-es subpath.
packages/shared/package.json Exposes ./lodash-es subpath and changes how lodash-es is declared.
packages/core/src/theme/components/Search/SearchPanel.tsx Updates debounce import to shared lodash-es entry.
packages/core/src/node/ssg/renderPages.ts Updates chunk import to shared lodash-es entry.
packages/core/src/node/runtimeModule/pageData/createPageData.ts Updates groupBy import to shared lodash-es entry and adds callback typing.
packages/core/package.json Removes lodash-es (and its types) from core dependencies.
.changeset/tall-walls-matter.md Adds a changeset documenting the dependency move.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SoonIter SoonIter force-pushed the vk/a775-lodash-es-depend branch from 01f3676 to c0de952 Compare April 8, 2026 07:40
@SoonIter SoonIter requested a review from Timeless0911 April 8, 2026 07:45
@SoonIter SoonIter changed the title perf(deps): externalize lodash-es via shared perf(deps): externalize lodash-es via shared to reduce install size Apr 8, 2026
@SoonIter SoonIter enabled auto-merge (squash) April 8, 2026 07:45
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
node 12.7 MB 0
node_md 1.6 MB 0
web 16.3 MB 0

Generated by Rsdoctor GitHub Action

@SoonIter SoonIter merged commit b4b0844 into main Apr 8, 2026
6 checks passed
@SoonIter SoonIter deleted the vk/a775-lodash-es-depend branch April 8, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants