pstbn.io
pstbn.io/2q_GX3Fz
MarkdownAug 17, 2026, 7:44 AM6 days left
Markdown
Analyze the entire React Native codebase to investigate why the Metro bundling process is taking an unusually long time (around 1–2 hours).

IMPORTANT:

- Do NOT modify, edit, delete, create, or refactor any files.
- Do NOT install or uninstall packages.
- Do NOT run commands that change the project.
- This is an investigation/audit only.
- Do not attempt to fix anything yet.

First, inspect the project structure, package.json, Metro configuration, Babel configuration, React Native configuration, entry points, dependencies, source code, assets, and any other files that could affect Metro bundling.

Analyze the codebase specifically for potential causes of extremely slow bundling, including but not limited to:

1. Metro configuration problems
2. Babel configuration issues
3. Incorrect or unnecessary Metro transformers
4. Large or unnecessarily included dependencies
5. Duplicate dependencies or multiple versions of the same package
6. Circular dependencies
7. Extremely large JavaScript/JSON files
8. Large assets accidentally imported into JavaScript
9. Imports that cause Metro to traverse unnecessarily large parts of the project
10. Barrel/index files that create excessive dependency traversal
11. Dynamic or unusual require/import patterns
12. Incorrect asset handling
13. node_modules-related problems
14. Symlink/workspace/monorepo configuration issues, if applicable
15. Watchman/file-watching issues, if applicable
16. React Native/Reanimated/other Babel plugin configuration issues
17. Development dependencies accidentally included in the production/runtime dependency graph
18. Excessive number of files Metro has to process
19. Generated files or build artifacts being included in Metro's resolver scope
20. Any configuration that could cause Metro to repeatedly process or traverse files
21. Anything unusual about the dependency graph that could explain the bundling time
22. Any project-specific code patterns that could significantly increase bundle processing time

If useful, inspect dependency relationships and identify which files/packages contribute most to the bundle graph.

At the end, provide a structured report with:

1. Most Likely Causes

Rank the suspected causes from highest to lowest impact.

For each one, explain:

- What you found
- Where you found it (file/path)
- Why it could slow Metro down
- How serious the issue appears to be
- Your confidence level

2. Evidence

List the concrete evidence from the codebase supporting each suspected cause.

3. Things That Look Normal

Mention configurations or areas you inspected that do NOT appear to be responsible.

4. Recommended Fixes

Give specific fixes for each problem, but DO NOT implement any of them.

Rank the fixes by expected impact:

- Critical
- High
- Medium
- Low

5. Additional Diagnostics

If the codebase alone is insufficient to determine the exact bottleneck, tell me exactly which commands or measurements I should run manually to gather more evidence.

Do not make any changes to the project during this entire investigation.

Your final response should be an audit report only, followed by a concise conclusion identifying the 1–3 most likely reasons the bundling process is taking so long.