{"id":15378900,"url":"https://github.com/avivahl/native-esm-react","last_synced_at":"2025-04-15T17:24:41.021Z","repository":{"id":37852023,"uuid":"424945480","full_name":"AviVahl/native-esm-react","owner":"AviVahl","description":"native esm react example","archived":false,"fork":false,"pushed_at":"2025-04-09T14:58:24.000Z","size":545,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T15:49:25.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AviVahl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-11-05T12:45:43.000Z","updated_at":"2025-04-09T14:58:27.000Z","dependencies_parsed_at":"2023-02-14T10:45:49.547Z","dependency_job_id":"db4d7987-1638-4c74-8780-92d9689a8ac6","html_url":"https://github.com/AviVahl/native-esm-react","commit_stats":{"total_commits":473,"total_committers":3,"mean_commits":"157.66666666666666","dds":"0.41014799154334036","last_synced_commit":"d2d55fbc4d2cbcd6339c642ac4a69ba58fd070d3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AviVahl%2Fnative-esm-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AviVahl%2Fnative-esm-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AviVahl%2Fnative-esm-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AviVahl%2Fnative-esm-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AviVahl","download_url":"https://codeload.github.com/AviVahl/native-esm-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249117195,"owners_count":21215349,"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":[],"created_at":"2024-10-01T14:17:22.921Z","updated_at":"2025-04-15T17:24:41.001Z","avatar_url":"https://github.com/AviVahl.png","language":"TypeScript","readme":"# native-esm-react\n\nNative esm React example.\n\n## What's shown?\n\n- An example [React](https://github.com/facebook/react) application rendering two svg logos.\n- An http server that:\n  - serves the above application using SSR at `http://localhost:3000/`\n  - uses a worker thread to separate app evaluation/rendering from http server.\n  - supports live reloading of the SSR renderer and connected clients.\n  - is not production-ready, as there's no caching, compression, etc.\n- Both application and server are compiled into a **single** ESM output that works natively in Node.js _AND_ browsers that [support import maps](https://caniuse.com/import-maps).\n- Source maps work in Node and browsers. Nicer debugging experience compared to CommonJS, as imported symbol names are kept the same.\n- Asset references using `new URL('./asset.svg, import.meta.url)` are shown and work for SSR as well. Assets must live outside the `src` tree so relative references from `dist` work.\n- A _really_ cool `\"start\"` script that triggers server reloading while giving a `tsc -w` like experience.\n- Tiny amount of dev/runtime dependencies. `npm i` and look at `node_modules`.\n- React itself is _not_ published as native ESM, so the application uses https://esm.sh to load client-side React.\n- Written using strict TypeScript.\n\n## Getting Started\n\n- Clone repository.\n- `npm i`\n- `npm start`\n- Open `http://localhost:3000/` in a browser [compatible with import maps](https://caniuse.com/import-maps).\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivahl%2Fnative-esm-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favivahl%2Fnative-esm-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivahl%2Fnative-esm-react/lists"}