⚡️ Supercharge VS Code's "Find All References" with React.lazy() and Next.js dynamic() detection
✨ Essential for teams using code splitting, lazy loading, and modern React patterns ✨
This extension is your secret weapon for navigating modern React codebases. It bridges the gap between VS Code's static analysis and React's dynamic patterns, ensuring zero missed references in your lazy-loaded components.
- ✨ Why You'll Love This Extension
- 🚀 Quick Start
- 📋 Supported Patterns & Languages
- ⚙️ Configuration
- 🛠️ Development & Contributing
- 💝 Support
- 📄 License
Automatically finds React lazy and Next.js dynamic imports that VS Code's built-in search misses:
// These are now included in "Find All References"!
const LazyComponent = React.lazy(() => import('./MyComponent'));
const DynamicComponent = dynamic(() => import('./MyComponent'));
Just install and go! Works seamlessly with:
- React code splitting with
React.lazy()
- Next.js dynamic imports with
dynamic()
- Any React-based framework using these patterns
- Custom lazy loading implementations
- No performance impact - only runs when you need it
- TypeScript aware - understands your type definitions
- Path resolution - handles aliases and relative imports
- Monorepo ready - works with complex project structures
Designed specifically for React and Next.js projects:
- ⚛️ React with lazy loading
- 🔺 Next.js with dynamic imports
- 📱 React Native Metro bundler
- 🖼️ Gatsby code splitting
- 📦 Any React-based framework
📦 Installation (Click to expand)
- Open VS Code
- Press
Ctrl+Shift+X
(orCmd+Shift+X
on macOS) - Search for "Dynamic Import References"
- Click Install ✨
code --install-extension bubablue00.dynamic-import-references
Download the latest .vsix
file from releases and install manually.
- Open any React/Next.js file in your project
- Right-click on a component name that's used in
React.lazy()
ordynamic()
- Select "Find All References" (or press
Shift+F12
) - Enjoy complete results including lazy and dynamic imports! 🎉
Pro Tip: Works especially well with React components that are code-split using
React.lazy()
or Next.jsdynamic()
imports!
Language | Extensions | Supported Patterns |
---|---|---|
JavaScript | .js , .jsx |
React.lazy() , dynamic() |
TypeScript | .ts , .tsx |
React.lazy() , dynamic() , with types |
// ✅ All of these patterns are detected:
// React lazy loading
const LazyComponent = React.lazy(() => import('./components/LazyComponent'));
const AnotherLazy = lazy(() => import('./components/AnotherComponent'));
// Next.js dynamic imports
const DynamicComponent = dynamic(() => import('./components/Button'));
const ConditionalComponent = dynamic(() => import('./components/Modal'), {
ssr: false
});
// Variable declarations with lazy/dynamic
let MyLazyComp = React.lazy(() => import('./MyComponent'));
var MyDynamicComp = dynamic(() => import('./MyComponent'));
const MyComponent = lazy(() => import('./path/to/MyComponent'));
// TypeScript with types
const TypedComponent: React.ComponentType = lazy(() => import('./TypedComponent'));
// These patterns are NOT detected by this extension:
const module = await import('./module');
const { Component } = await import('./Component');
Zero configuration required! 🎉 The extension works automatically when enabled.
🚀 Local Development Setup
Node.js 16+, npm and VS Code 1.60+
# Clone the repository
git clone https://github.com/bubablue/dynamic-import-references.git
cd dynamic-import-references
# Install dependencies
npm install
# Open in VS Code
code .
# Start development
npm run watch:esbuild
# Run all tests
npm test
# Run tests in watch mode
npm run watch-tests
- Press
F5
to launch the Extension Development Host - Open a test project in the new window
- Test the extension functionality
npm run package
🤝 How to Contribute
We welcome contributions! Here's how you can help:
- 🐛 Report Bugs - Found an issue? Open an issue
- 💡 Suggest Features - Have an idea? We'd love to hear it!
- 📝 Improve Documentation - Help make the docs even better
- 🔧 Submit Code - Fix bugs or add features with a PR
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
|
|
💡 Have an idea? Suggest a feature • 🐛 Found a bug? Report it
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by developers, for developers
Icon by Arkinasi