HomePhabricator
Diffusion Comm 0e2804a3c8ca

[native] Omit extensions when importing components with platform-specific…

Description

[native] Omit extensions when importing components with platform-specific extensions

Summary:
We use this functionality of Metro (React Native packager) to fork code between platforms: link

My recent work to add file extensions to all imports broke this functionality. Metro does this mapping by suffixing eg. .ios.js to the import path, so when we include .js in the import that makes it impossible for things to work.

This diff reverts the changes in D6692 for the subset of files in native where we use platform-specific extensions, and adds an eslint-ignore to disable the check from D6694.

Test Plan: Add a console.log to one of the iOS files and confirm the log prints in the iOS simulator (it didn't before this diff)

Reviewers: atul, tomek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D6729