feat(optimizer): add rush lockfile support#20833
Merged
sapphi-red merged 4 commits intoOct 22, 2025
Merged
Conversation
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Configuration for lock file location to fix issues with dependency optimizer
feat: add lockFilePath configuration for dependency optimizer to support monorepos
Sep 24, 2025
sapphi-red
reviewed
Sep 24, 2025
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Copilot
AI
changed the title
feat: add lockFilePath configuration for dependency optimizer to support monorepos
feat: add Rush.js lockfile support for dependency optimizer
Sep 24, 2025
sapphi-red
reviewed
Sep 24, 2025
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
sapphi-red
approved these changes
Sep 24, 2025
bluwy
approved these changes
Sep 24, 2025
Member
bluwy
left a comment
There was a problem hiding this comment.
I wonder if we should also uncomment this if we somewhat have rush support now:
It was added in https://github.com/vitejs/vite/pull/2850/files#diff-64df9f2b7e879d5f5da8a632345e240f078cbb36a258ec5c92752744d02a87c9R13
Member
|
I think we can add that too (maybe also with nx #20090). But I guess we should add it in a major because it will allow more files in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
packages/vite/src/node/optimizer/index.tsgetLockfileHashfunction andlockfileFormatsarray.rush/temp/shrinkwrap-deps.jsontolockfileFormatsImplementation Details
Rush.js Lockfile Support
Added Rush.js lockfile format to the
lockfileFormatsarray to enable automatic detection of.rush/temp/shrinkwrap-deps.jsonfiles. The entry is positioned right after the pnpm lockfile entry since Rush.js uses pnpm internally.This minimal change resolves the core issue where Vite fails to work with Rush.js monorepos due to non-standard lockfile locations, without adding any new configuration options.
Additional instructions:
Fixes #20817
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.