Skip to content

feat(cli): expose vite lib config#363

Merged
Brooooooklyn merged 1 commit intomainfrom
12-23-feat_cli_expose_vite_lib_config
Dec 23, 2025
Merged

feat(cli): expose vite lib config#363
Brooooooklyn merged 1 commit intomainfrom
12-23-feat_cli_expose_vite_lib_config

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Dec 23, 2025

Note

Expose Vite lib config to tsdown during vite lib

  • Lib command writes node_modules/.vite/task-cache/vite-lib.config.js via write_vite_lib_config, which imports vite.config.ts and exports default.lib; the file is then passed to tsdown via --config.
  • Updated snapshots to reflect "Using tsdown config" output path.
  • Extracted resolveUniversalViteConfig from bin.ts into src/resolve-vite-config.ts and import it in bin.ts.

Written by Cursor Bugbot for commit 579e326. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings December 23, 2025 09:28
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

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

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 resolveUniversalViteConfig function to a dedicated resolve-vite-config.ts module for better code organization
  • Added automatic generation of vite-lib.config.js in the workspace cache that imports and exposes the lib configuration from the user's vite.config.ts
  • Modified the lib command to automatically inject the generated config file via the --config flag

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.

Comment thread packages/cli/binding/src/cli.rs
Comment thread packages/cli/src/resolve-vite-config.ts
Comment thread packages/cli/binding/src/cli.rs
Comment thread packages/cli/binding/src/cli.rs
@Brooooooklyn Brooooooklyn force-pushed the 12-23-feat_cli_expose_vite_lib_config branch from c258aaa to 579e326 Compare December 23, 2025 09:36
Copy link
Copy Markdown
Member Author

Brooooooklyn commented Dec 23, 2025

Merge activity

  • Dec 23, 10:18 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 23, 10:19 AM UTC: @Brooooooklyn merged this pull request with Graphite.

@Brooooooklyn Brooooooklyn merged commit c10c45a into main Dec 23, 2025
13 checks passed
@Brooooooklyn Brooooooklyn deleted the 12-23-feat_cli_expose_vite_lib_config branch December 23, 2025 10:19
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.

3 participants