Awesome
typescript-monorepo-cra-example
🙉 TypeScript Monorepo Sample
Required TypeScript@3 above
Create monorepo with create-react-app
Prerequisition
create-react-app
, yarn
Create monorepo
$ create-react-app typescript-monorepo/packages/react-app --react-scripts=react-scripts-ts
$ cd typescript-monorepo
$ rm -r packages/react-app/node_modules
- create package.json
- create packages/tsconfig.json
- create packages/tsconfig.base.json
Create component
- create packages/component-a - 3 files
Edit react-app
- edit packages/react-app/src/App.tsx
- edit packages/react-app/package.json
$ yarn
$ yarn build:packages
$ yarn start
Related
- typescript-monorepo-next-example - Next.js version