-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Watch Mode Improvement for Monorepo Dependencies
Problem
tsup's watch mode doesn't detect changes in workspace dependencies (specifically the shared package) in our monorepo setup. This affects development efficiency as developers need to manually rebuild when making changes to the shared package.
Current Behavior
- Watch mode only monitors changes in the current package
- Changes in
@oh-my-commit/shared
don't trigger rebuilds - Developers need to manually restart the build process
Expected Behavior
- Watch mode should detect changes in workspace dependencies
- Changes in
@oh-my-commit/shared
should trigger automatic rebuilds - Seamless development experience across the monorepo
Potential Solutions
-
Use chokidar for file watching
- Implement direct file system watching
- Add chokidar as a development dependency
- Configure to watch shared package files
-
Integrate with turborepo's watch feature
- Leverage native monorepo support
- Configure workspace-aware watching
- Integrate with existing turborepo setup
-
Use nodemon for development
- Simple implementation
- Watch multiple directories
- Handle rebuilds automatically
Technical Details
- Current configuration in packages/cli/tsup.config.ts
- Uses tsup's built-in watch mode
- Workspace dependency:
@oh-my-commit/shared
Related Issues
- tsup issue: Support for TypeScript project references egoist/tsup#647
- turbo issue: Feature request: Watch mode vercel/turborepo#986
Additional Context
- This is documented in our TODO.md
- Current workaround is manual rebuilding
- Affects local development workflow
Tasks
- Research and evaluate solutions
- Implement chosen solution
- Add tests for watch mode
- Update documentation
- Add migration guide if needed
Labels
- enhancement
- development
- build
- monorepo
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed