{"id":13423730,"url":"https://github.com/deptno/typescript-monorepo-next-example","last_synced_at":"2026-03-11T01:02:33.259Z","repository":{"id":84263606,"uuid":"144813610","full_name":"deptno/typescript-monorepo-next-example","owner":"deptno","description":"TypeScript@3 monorepo example next.js version","archived":false,"fork":false,"pushed_at":"2018-08-15T06:19:32.000Z","size":51,"stargazers_count":43,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-01T01:32:08.066Z","etag":null,"topics":["example","monorepo","monorepo-example","next","nextjs","typescript","typescript-monorepo","typescript-monorepo-example","typescript-monorepo-next","typescript-monorepo-nextjs","workspace"],"latest_commit_sha":null,"homepage":"","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/deptno.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}},"created_at":"2018-08-15T06:19:20.000Z","updated_at":"2024-08-12T19:40:52.000Z","dependencies_parsed_at":"2023-05-24T04:30:09.266Z","dependency_job_id":null,"html_url":"https://github.com/deptno/typescript-monorepo-next-example","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/deptno%2Ftypescript-monorepo-next-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Ftypescript-monorepo-next-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Ftypescript-monorepo-next-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Ftypescript-monorepo-next-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deptno","download_url":"https://codeload.github.com/deptno/typescript-monorepo-next-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244096984,"owners_count":20397514,"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":["example","monorepo","monorepo-example","next","nextjs","typescript","typescript-monorepo","typescript-monorepo-example","typescript-monorepo-next","typescript-monorepo-nextjs","workspace"],"created_at":"2024-07-31T00:00:41.377Z","updated_at":"2026-03-11T01:02:33.185Z","avatar_url":"https://github.com/deptno.png","language":"TypeScript","funding_links":[],"categories":["Boilerplates","TypeScript","Built with TypeScript"],"sub_categories":["Web/ReactJS"],"readme":"# typescript-monorepo-next-example\n\n![\u003cComponentA\u003e](assets/monorepo-next.png)\n\n\u003e 🙉🙉 TypeScript Monorepo Sample  \nRequired TypeScript@3 above\n\n## Create monorepo with next.js\n\n### Prerequisition\n`yarn`\n\n### Create monorepo\n\n```bash\n\n$ mkdir typescript-monorepo \u0026\u0026 cd $_\n$ yarn init -y -p\n```\n\n- edit [package.json](package.json#L7-L14) # setup workspace and scripts\n\n```bash\n$ mkdir -p packages/app \u0026\u0026 cd $_\n$ yarn init -y\n$ yarn add -D typescript @types/react\n$ yarn add next react react-dom @zeit/next-typescript\n$ mkdir pages\n$ touch pages/index.tsx next.config.js .babelrc.js tsconfig.json\n$ cd ../.. # change root directory\n```\n\n- edit [packages/app/next.config.js](packages/app/next.config.js)\n- edit [packages/app/.babelrc.js](packages/app/.babelrc.js)\n- edit [packages/app/tsconfig.json](packages/app/tsconfig.json)\n- edit packages/app/package.json\n  - [packages/app/package.json](packages/app/package.json#L6-L8) # add script\n  - [packages/app/package.json](packages/app/package.json#L16) # add package(component-a) dependency\n- edit [packages/app/pages/index.tsx](packages/app/pages/index.tsx) # add default page and load component from package\n\n### Configure typescript monorepo\n- create [packages/tsconfig.json](packages/tsconfig.json)\n- create [packages/tsconfig.base.json](packages/tsconfig.base.json)\n\n### Create component\n\n```bash\n$ mkdir -p packages/component-a \u0026\u0026 cd $_\n$ yarn init -y\n$ yarn add -D typescript @types/react\n$ yarn add react\n$ touch index.tsx tsconfig.json\n$ cd ../.. # change root directory\n```\n\n- edit [packages/component-a/index.tsx](packages/component-a/index.tsx) # add default page and load component from package\n- edit [packages/component-a/tsconfig.json](packages/component-a/tsconfig.json) # add default page and load component from package\n\n```bash\n$ yarn\n$ yarn build:packages # or yarn build:packages:watch\n$ yarn start\n```\n\n### Related\n\n- [typescript-monorepo-cra-example](https://github.com/deptno/typescript-monorepo-cra-example) - CRA(`create-react-app`) version\n- [next.js-typescript-starter-kit](https://github.com/deptno/next.js-typescript-starter-kit) - Next.js TypeScript starter kit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeptno%2Ftypescript-monorepo-next-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeptno%2Ftypescript-monorepo-next-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeptno%2Ftypescript-monorepo-next-example/lists"}