← ClaudeAtlas

platform-resolution-checklisted

Use when a bug appears on one platform only, when a React Native background handler or native module never runs, or when a .web/.ios/.android file seems to be ignored. Checks the quiet machinery that picks one file over another.
DomenicMoran/verified-done · ★ 2 · Web & Frontend · score 73
Install: claude install-skill DomenicMoran/verified-done
# When it breaks on one platform only, suspect resolution Bundlers pick files by extension. Metro turns `./index` into `index.android.js`, `index.ios.js` or `index.js` depending on the platform. Webpack and Expo's web build do the same with `.web.tsx`. This machinery is silent. It either engages or it does not, and both look identical: no warning, no error. The application starts, and one file simply never loads. ## The check, in order 1. **Is the entry point extensionless?** ```json { "main": "index" } ``` With `"main": "index.js"` there is nothing left to resolve. Android loads `index.js` and never sees `index.android.js`. Anything registered there, typically background task handlers and widget handlers, never registers. 2. **Does the registration actually run?** Add a log line at the point of registration, not at the point of use. A handler that is never registered produces no error; the system just never calls it. 3. **Is the platform file where the resolver looks?** A `.web.tsx` stub next to a native-only module has to sit beside the import path, not beside the package. 4. **Did a prebuild step overwrite it?** Generating native projects rewrites directories. Anything not managed by a config plugin, hand-written native modules among them, can be wiped. Check `git status` after every prebuild. ## Symptom to suspect | Symptom | Look at | | --- | --- | | Background task fires, nothing happens | Entry point resolution, handler re