Skip to content

fix: use vite build in prepare script to avoid devDependency requirement#28

Merged
itsrafsanjani merged 1 commit intomainfrom
fix/prepare-script-vite-build
Mar 13, 2026
Merged

fix: use vite build in prepare script to avoid devDependency requirement#28
itsrafsanjani merged 1 commit intomainfrom
fix/prepare-script-vite-build

Conversation

@itsrafsanjani
Copy link
Copy Markdown
Contributor

@itsrafsanjani itsrafsanjani commented Mar 13, 2026

Summary

  • Changes the prepare script from npm run build (tsc && vite build) to vite build directly
  • Fixes build failure when installing from git: tsc requires devDependencies (e.g. minimatch type definitions) which aren't installed for git dependencies
  • vite build alone produces the dist/ output that consuming projects need

Test plan

  • Install from this branch via git (npm install weDevsOfficial/tail-react#fix/prepare-script-vite-build) and verify dist/ is built without errors
  • Verify normal npm install from the registry still works as expected

Summary by CodeRabbit

  • Chores
    • Updated build process configuration.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tail-react Error Error Mar 13, 2026 5:10am

@itsrafsanjani itsrafsanjani merged commit 208244f into main Mar 13, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 13, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aeb1e9a8-7cc1-4239-abf0-73856d733449

📥 Commits

Reviewing files that changed from the base of the PR and between db2d1c5 and 3b20ebd.

📒 Files selected for processing (1)
  • package.json

Walkthrough

The prepare script in package.json was updated to invoke Vite's build command directly instead of routing through npm scripts. This is a single-line modification to the build invocation mechanism executed during npm package preparation.

Changes

Cohort / File(s) Summary
Build Script Configuration
package.json
Updated scripts.prepare from "npm run build" to "vite build", changing the build invocation during npm prepare execution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A script takes flight, so swift and direct,
Vite now builds our code, no npm interject,
One line transforms the path we take,
Faster builds for goodness' sake! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/prepare-script-vite-build
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant