Commit 61cec5d
Dave Matthews
fix: clear Metro cache after generating native assets
The asset filenames include a content hash (e.g. icon_svg_a1b2c3) that
must match between the native assets and Metro's asset registry. The
generate step spins up its own Metro instance to discover assets, but
the dev server maintains a separate persistent cache.
When SVG content changes (e.g. after a git rebase), the generate step
produces native assets with new hashes, but a stale dev server cache
can still serve the old hash at runtime, causing "Could not find image"
warnings.
Clearing the Metro cache directory after asset generation forces the
dev server to recompute all asset hashes on next start, ensuring they
match the freshly generated native resources.1 parent 6250570 commit 61cec5d
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
0 commit comments