Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes Vite library configuration by refactoring the resolveUniversalViteConfig function into a separate module and adding functionality to automatically generate and inject a Vite lib config file when running the lib command.
Key Changes:
- Extracted
resolveUniversalViteConfigfunction to a dedicatedresolve-vite-config.tsmodule for better code organization - Added automatic generation of
vite-lib.config.jsin the workspace cache that imports and exposes the lib configuration from the user'svite.config.ts - Modified the
libcommand to automatically inject the generated config file via the--configflag
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/cli/src/resolve-vite-config.ts | New module containing the extracted resolveUniversalViteConfig function for resolving Vite configuration |
| packages/cli/src/bin.ts | Refactored to import resolveUniversalViteConfig from the new module instead of defining it inline |
| packages/cli/binding/src/cli.rs | Added write_vite_lib_config function to generate a JavaScript config file that imports lib settings from vite.config.ts, and integrated it into the Lib command flow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fengmk2
approved these changes
Dec 23, 2025
c258aaa to
579e326
Compare
Member
Author
Merge activity
|
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.

Note
Expose Vite lib config to
tsdownduringvite libLibcommand writesnode_modules/.vite/task-cache/vite-lib.config.jsviawrite_vite_lib_config, which importsvite.config.tsand exportsdefault.lib; the file is then passed to tsdown via--config.resolveUniversalViteConfigfrombin.tsintosrc/resolve-vite-config.tsand import it inbin.ts.Written by Cursor Bugbot for commit 579e326. This will update automatically on new commits. Configure here.