{"id":15354969,"url":"https://github.com/capaj/vite-lingui-poc","last_synced_at":"2025-04-15T06:17:24.934Z","repository":{"id":53766416,"uuid":"347329136","full_name":"capaj/vite-lingui-poc","owner":"capaj","description":"just a sample app showing how to use lingui.js with vite bundler","archived":false,"fork":false,"pushed_at":"2021-04-02T13:59:05.000Z","size":419,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T06:17:19.947Z","etag":null,"topics":["esbuild","i18n","linguijs","reactjs","typescript","vite","vite-plugin","vitejs"],"latest_commit_sha":null,"homepage":"https://capaj.github.io/vite-lingui-poc/","language":"JavaScript","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/capaj.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}},"created_at":"2021-03-13T09:37:32.000Z","updated_at":"2023-03-26T10:41:40.000Z","dependencies_parsed_at":"2022-09-13T10:22:23.013Z","dependency_job_id":null,"html_url":"https://github.com/capaj/vite-lingui-poc","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/capaj%2Fvite-lingui-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fvite-lingui-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fvite-lingui-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fvite-lingui-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capaj","download_url":"https://codeload.github.com/capaj/vite-lingui-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016646,"owners_count":21198833,"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":["esbuild","i18n","linguijs","reactjs","typescript","vite","vite-plugin","vitejs"],"created_at":"2024-10-01T12:21:53.706Z","updated_at":"2025-04-15T06:17:24.917Z","avatar_url":"https://github.com/capaj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vite + Lingui.js POC\n\nShowcase how to make lingui.js work with Vite.\nFor babel macros to work correctly we need babel transpilation.\n\nSolution proposed in this POC is to use a reactBabelRefreshPlugin which is mostly exact to what the official `@vitejs/plugin-react-refresh` is, but with a tweak that enables the babel transformation even in production builds.\nAlternative solution would be to use https://github.com/itsMapleLeaf/vite-plugin-babel-macros together with `@vitejs/plugin-react-refresh`, but this would be slower, because the code needs to be parsed 2x by Babel instead of just once as it is implemented here in the custom plugin.\n\nTo run this on your machine, just install deps and run `npm run dev`.\n\n## Word of caution:\nThe custom plugin we have is incompatible with a deprecated `@babel/polyfill`. Not sure why exactly that is, but if you replace it's import with \n```\nimport 'core-js/stable'\nimport 'regenerator-runtime/runtime\n```\nit works fine even in build time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fvite-lingui-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapaj%2Fvite-lingui-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fvite-lingui-poc/lists"}