-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Migrate tsup configuration to tsup.config.ts #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit migrates the tsup build and dev configurations from package.json scripts to a dedicated tsup.config.ts file. This centralizes the build configuration and improves maintainability.
|
Caution Review failedThe pull request is closed. WalkthroughThe changes update the project's build configuration by introducing a dedicated Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant npm/yarn
participant tsup
participant tsup.config.ts
participant Output
Developer->>npm/yarn: Run "npm run build" or "npm run dev"
npm/yarn->>tsup: Execute tsup (no explicit args)
tsup->>tsup.config.ts: Load configuration
tsup.config.ts-->>tsup: Provide build options (entry, formats, dts, banner, etc.)
tsup->>Output: Bundle files, generate outputs, inject banner
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
tsup.config.ts (1)
10-16: Minor: banner string contains leading indentation that will appear in the output files.The four-space indent inside the template literal is preserved verbatim. Dropping it yields a cleaner header:
- banner: { - js: `/** - * ${pkg.name} v${pkg.version} - * Author: ${pkg.author} - */ - `, - }, + banner: { + js: `/**\n * ${pkg.name} v${pkg.version}\n * Author: ${pkg.author}\n */`, + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
package.json(1 hunks)tsconfig.json(1 hunks)tsup.config.ts(1 hunks)
🔇 Additional comments (1)
tsconfig.json (1)
5-5: Switching tomoduleResolution: "bundler"can break editor / test tooling – double-check downstream consumers.
"bundler"opts-in to TypeScript 5’s new resolution algorithm. Tools that still rely on classic/Node resolution (e.g.ts-node, older ESLint configs, Vitest when usingthreads: false) may suddenly fail to locate declaration files or stubbed modules.Before merging, please run the full test suite and a cold-start IDE type-check to ensure no regressions. If issues surface, consider conditionally overriding the setting in a dedicated
tsconfig.build.json.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit migrates the tsup build and dev configurations from package.json scripts to a dedicated
tsup.config.ts file. This centralizes the build configuration and improves maintainability.
Summary by CodeRabbit