Expo Atlas Plugin
The Expo Atlas plugin integrates Expo Atlas directly into your React Native DevTools, providing powerful bundle analysis and optimization capabilities for your React Native applications.
What is Expo Atlas?
Expo Atlas is a bundle analyzer and visualizer that helps you understand and optimize your React Native app's Metro bundle. It provides:
- Bundle Visualization: Interactive view of your Metro bundle structure
- Module Analysis: Detailed information about each module in your bundle
- Size Optimization: Identify large dependencies and optimize bundle size
- Dependency Mapping: Visualize module relationships and dependencies
- Performance Insights: Understand how your bundle affects app performance
Installation
Install the Expo Atlas plugin as a development dependency using your preferred package manager:
npm install -D @rozenite/expo-atlas-plugin
Update your Metro configuration to enable the Expo Atlas plugin:
metro.config.js
const { withRozenite } = require('@rozenite/metro');
const { withRozeniteExpoAtlasPlugin } = require('@rozenite/expo-atlas-plugin');
const config = {
// Your existing Metro configuration
};
module.exports = withRozenite(withRozeniteExpoAtlasPlugin(config), {
// Your Rozenite configuration
});
Usage
Once configured, the Expo Atlas plugin will automatically appear in your React Native DevTools sidebar as "Expo Atlas". Click on it to access:
Bundle Overview
- Bundle Size Analysis: View total bundle size and breakdown by module
- Module Distribution: See how your bundle is distributed across different file types
- Entry Points: Identify main entry points and their dependencies
Module Details
- Individual Module Sizes: Analyze the size contribution of each module
- Source Code Inspection: View the actual source code of modules in your bundle
- Dependency Chains: Trace how modules depend on each other
Optimization Insights
- Large Dependencies: Identify modules that significantly impact bundle size
- Duplicate Code: Find potential code duplication across modules
- Unused Code: Detect potentially unused dependencies
Development vs Production
- Development Bundle: Analyze your development bundle in real-time
- Production Bundle: Export and analyze production bundles for optimization
Contributing
The Expo Atlas plugin is open source and welcomes contributions! Check out the Plugin Development Guide to learn how to contribute or create your own plugins.
Support
If you encounter issues with the Expo Atlas plugin:
- Check Documentation: Review this guide for common solutions
- Search Issues: Look for similar issues in the repository
- Create Issue: Report bugs or request features
- Community: Reach out to the Rozenite community for help
Next: Learn about Plugin Development to create your own plugins, or explore other Official Plugins.