{"id":19529924,"url":"https://github.com/loopmode/vite-react-ts-monorepo","last_synced_at":"2025-09-01T03:08:07.986Z","repository":{"id":140400606,"uuid":"431647855","full_name":"loopmode/vite-react-ts-monorepo","owner":"loopmode","description":"A starter project with yarn workspaces and lerna supporting multiple packages and vite apps","archived":false,"fork":false,"pushed_at":"2021-11-24T22:54:09.000Z","size":95,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T02:43:11.968Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loopmode.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":"2021-11-24T22:44:32.000Z","updated_at":"2023-01-01T15:41:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"72d8f147-517d-497a-aea6-f57c397efb97","html_url":"https://github.com/loopmode/vite-react-ts-monorepo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/loopmode/vite-react-ts-monorepo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fvite-react-ts-monorepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fvite-react-ts-monorepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fvite-react-ts-monorepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fvite-react-ts-monorepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopmode","download_url":"https://codeload.github.com/loopmode/vite-react-ts-monorepo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fvite-react-ts-monorepo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273068853,"owners_count":25039911,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-11T01:28:09.002Z","updated_at":"2025-09-01T03:08:07.933Z","avatar_url":"https://github.com/loopmode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vite typescript react monorepo\n\nmultiple apps and multiple shared packages.\n\n## @project scope\n\nEither use `@project` as scope for all packages, as those packages will remain private anyways. This helps you quickly check on your symlinked packages in `node_modules/@project/*`, all in one place.\n\nOr alternatively use some other useful scope, like your project name (e.g. `@mystuff`). In this case, run an initial search and replace for `@project` -\u003e `@yourscope`.\n\nWhen describing conventions later on, when we refer to the scope `@project`, we basically mean `@whatever-scope-you-used.`\n\n## Adding app packages\n\nYou can use the official way of creating vite apps:\n\n```\nyarn create @vitejs/app packages/app-appname --template react-ts\n```\n\n### Suggested naming convention\n\n- Use the naming convention `app-appname`, replacing `appname` by the proper value. This is helpful to distinguish apps from regular/shared packages when using the `--scope` and `--ignore` arguments in lerna commands (e.g. `lerna run build --scope app-*`).\n- You will be asked for a package name. Use the `@project` scope as prefix, e.g. `@project/app-appname`\n\n## Typescript configuration\n\n### tsconfig for app packages\n\nExtend your `tsconfig.json` from `../../tsconfig.app.json`, and include other workspace packages that you want working auto-imports to in VSCode.\n\nExample app tsconfig.json:\n\n```\n{\n  \"extends\": \"../../tsconfig.app.json\",\n  \"include\": [\"./src\", \"../core/lib\"]\n}\n```\n\nIn this example, VSCode will give you nice auto-imports from this app to anything in the `core` package.\n\n### tsconfig for non-app packages\n\nRegular packages should extend from `../../tsconfig.lib.json`. Also, the packages themselves _must_ be registered in `tsconfig.app.json` so that they are available in app packages.\n\nExample non-app tsconfig.json:\n\n```\n{\n  \"extends\": \"../../tsconfig.lib.json\",\n  \"include\": [\"src\"],\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"rootDir\": \"src\",\n    \"outDir\": \"lib\"\n  }\n}\n```\n\nIf you want auto-imports working to other packages, same goes as for apps: You should put paths to those other packages into the `include` array.\n\nAlso note the entry in `tsconfig.app.json` in the root:\n```\n    ...\n   \"paths\": {\n      \"baseUrl\": [\".\"],     \n      \"@project/core/*\": [\"./packages/core/*\"]\n    }\n    ...\n```\nWithout this, you won't be able to consume the package in any app (as they extend from `tsconfig.app.json`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Fvite-react-ts-monorepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopmode%2Fvite-react-ts-monorepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Fvite-react-ts-monorepo/lists"}