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
Additional Context
- This is documented in our TODO.md
- Current workaround is manual rebuilding
- Affects local development workflow
Tasks
Labels
- enhancement
- development
- build
- monorepo
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
@oh-my-commit/shareddon't trigger rebuildsExpected Behavior
@oh-my-commit/sharedshould trigger automatic rebuildsPotential Solutions
Use chokidar for file watching
Integrate with turborepo's watch feature
Use nodemon for development
Technical Details
@oh-my-commit/sharedRelated Issues
Additional Context
Tasks
Labels