{"id":17205438,"url":"https://github.com/valentinh/poc-next-workspace","last_synced_at":"2025-03-25T10:21:06.007Z","repository":{"id":66077426,"uuid":"433036645","full_name":"ValentinH/poc-next-workspace","owner":"ValentinH","description":"POC of a workspace with multiple Next.js app and shared code","archived":false,"fork":false,"pushed_at":"2021-11-29T18:46:14.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-30T09:27:39.573Z","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/ValentinH.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-29T12:37:35.000Z","updated_at":"2021-11-29T18:46:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"43942e76-eb4a-4f53-b0d3-33f07073e17b","html_url":"https://github.com/ValentinH/poc-next-workspace","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/ValentinH%2Fpoc-next-workspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValentinH%2Fpoc-next-workspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValentinH%2Fpoc-next-workspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValentinH%2Fpoc-next-workspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ValentinH","download_url":"https://codeload.github.com/ValentinH/poc-next-workspace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245440485,"owners_count":20615633,"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-15T02:25:19.905Z","updated_at":"2025-03-25T10:21:05.932Z","avatar_url":"https://github.com/ValentinH.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POC of Yarn workspaces with multiple Next.js apps\n\nThis POC shows a repository with 2 Next.js applications and one shared \"common\" module.\nThis is done using a Yarn workspace.\n\n## Solved issues\n\n### Intellisense / Auto-imports in VSCode\n\nOne issue I faced was having auto-import working in VSCode for items in the `common` folder that were not already used\nin the `admin` or `worker` apps.\nThe key for this was to have the tsconfig files inside the Next.js projects not being called \"tsconfig.json\" so that\nthey were not loaded by VSCode. By adding the \".app\" suffix and telling Next.js to load it via the `next.config.json`,\nit's working as I was expecting at first.\n\n### JSX in \"common\" lib\n\nBy default, Next.js does not transpile libraries in the `node_modules`. However, when using a Yarn workspace,\nthe shared packages are actually imported from `node_modules`. Therefore, JSX or any non ES syntax is not transpiled.\nTo solve this, we have to use the `next-transpile-modules` plugin to explicitly transpile the \"common\" lib.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinh%2Fpoc-next-workspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalentinh%2Fpoc-next-workspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinh%2Fpoc-next-workspace/lists"}