{"id":17957635,"url":"https://github.com/evanbacon/metro-web-demo","last_synced_at":"2025-03-25T02:31:49.591Z","repository":{"id":105128455,"uuid":"492340177","full_name":"EvanBacon/Metro-web-demo","owner":"EvanBacon","description":"Demo of using Metro to bundle Expo apps for web","archived":false,"fork":false,"pushed_at":"2023-01-27T12:28:49.000Z","size":714,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T07:32:28.357Z","etag":null,"topics":["expo","metro","react-native"],"latest_commit_sha":null,"homepage":"https://metro-web.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvanBacon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-14T22:46:05.000Z","updated_at":"2024-12-12T16:06:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f30276a-2e8e-4255-8aa0-fc6566667562","html_url":"https://github.com/EvanBacon/Metro-web-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanBacon%2FMetro-web-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanBacon%2FMetro-web-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanBacon%2FMetro-web-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanBacon%2FMetro-web-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvanBacon","download_url":"https://codeload.github.com/EvanBacon/Metro-web-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245385546,"owners_count":20606668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expo","metro","react-native"],"created_at":"2024-10-29T10:55:53.293Z","updated_at":"2025-03-25T02:31:49.581Z","avatar_url":"https://github.com/EvanBacon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metro web demo\n\n\u003e This is a weekend project, I have no plans to land this in Expo.\n\nhttps://user-images.githubusercontent.com/9664363/168451003-bc2956bc-c878-4b92-9bdf-b34425303d5b.mp4\n\nDemo of using Metro to bundle Expo apps for web. [Try the web demo](https://metro-web.netlify.app/) (notice the giant JavaScript bundle).\n\nThis project also has full Fast Refresh support enabled and a few other React Native debugging features.\n\nThere is no bundle splitting, CSS handling, HTML templating, PWA Manifest generation, Service Worker configuration, React Suspense, or other critcal features in this Metro implementation.\n\nThe results of `@expo/webpack-config` (Webpack) are much nicer and far more sophisticated, I recommend Webpack for `react-native-web` usage.\n\n## Usage\n\n- Pull the `@evanbacon/cli/metro-web-support` branch on [expo/expo](https://github.com/expo/expo/) and setup the [local CLI](https://github.com/expo/expo/tree/main/packages/%40expo/cli#contributing).\n- Pull this project, run `yarn`.\n- Set the environment variable `EXPO_USE_METRO_WEB` to `1` or `true`.\n- Run `expo start` (using the local CLI), then press `w`.\n\nYou can also bundle the project by running `expo export` then test locally with `npx serve dist` or deploy with `npx netlify deploy --dir dist`\n\n## Further Work\n\n- Improve the rudimentary bundling practices across platforms. There should be at least some concept of bundle splitting.\n- ~~Web and native cannot be run at the same time because Metro hard codes the usage of `.native.js` files. In my project, the `preferNativePlatform` value has been turned off in a patch (breaking native).~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanbacon%2Fmetro-web-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevanbacon%2Fmetro-web-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanbacon%2Fmetro-web-demo/lists"}