Add React.js and ink built-in module support #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Summary
This pull request adds comprehensive built-in module support for React.js and ink (React for CLI applications) to use-m, enabling developers to use these popular frameworks without explicit dependency management.
📋 Issue Reference
Fixes #28
✨ Features Added
react,react-dom, andreact/jsx-runtimeink(React for CLI applications)🔧 Implementation Details
Built-in Module Support
Environment-Specific Behavior
📁 Files Added/Modified
Core Implementation
use.js,use.mjs,use.cjs- Added React.js and ink tosupportedBuiltinspackage.json- Version bump to 8.14.0Examples & Documentation
examples/react/- Node.js and browser React.js examplesexamples/ink/- CLI application examples with interactive featuresREADME.md- Updated with React.js and ink usage documentationTesting
tests/builtin-react.test.*- Comprehensive React.js built-in module teststests/builtin-ink.test.*- ink built-in module tests with environment detection🎯 Usage Examples
React.js in Browser
React.js in Node.js (SSR)
ink CLI Applications
✅ Testing
💡 Benefits
🔄 Migration
This is a purely additive change - no breaking changes to existing functionality. Users can immediately start using:
🤖 Generated with Claude Code