react-workspaces / react-workspaces-playground

⚛️ 🐈 Zero Config Create-React-App Monorepos with Yarn Workspaces, Lerna and React Storybook.
https://react-workspaces.github.io/react-workspaces-playground/
764 stars 128 forks source link

Typescript compatibility #6

Closed nloding closed 4 years ago

nloding commented 5 years ago

I'd really love to see this working with Typescript. My next big project, I'm hoping, will be a monorepo with 2-3 React apps, a couple backend services with an API, all in Typescript. I haven't looked at how you are running this yet, but wanted to start a thread to track it. Hopefully it's "simple"!

F1LT3R commented 5 years ago

So long as your packages are sharing the same CRA config, Typescript should be possible. I've not used storybook in a TS project before, so that may take a little work. That being said, Storybook has the SB --init command, which in theory should auto-configure storybook to work alongside your CRA config.

Thanks for the suggestion, we should def. get as TS version running ASAP.

huylift commented 5 years ago

Any suggestions on how to get started on making this work for TypeScript?

nloding commented 5 years ago

I haven't had time to start on this yet ... but I am still planning on doing a monorepo with Typescript for my next project.

comerc commented 5 years ago

@F1LT3R :1st_place_medal: I simplified your code and released CRA without fork or eject as host monorepo package. With rollup as bandler for packages. With Typescript compatibility. Enjoy

michal-murawski commented 5 years ago

@F1LT3R 🥇 I simplified your code and released CRA without fork or eject as host monorepo package. With rollup as bandler for packages. With Typescript compatibility. Enjoy

But how can you then work with many CRA apps?

CodingDive commented 5 years ago

I think this PR https://github.com/react-workspaces/create-react-app/pull/3 will enable nice TypeScript support 😍. Can't wait to use react-workspaces then as I'm currently running my own TypeScript configuration that breaks on every other react-scripts release 😭

neilime commented 4 years ago

Is there any chance that this issue will be fixed ? I've try the PR https://github.com/react-workspaces/create-react-app/pull/3, and it works like a charm.

Typescript is used more and more frequently, it is missing for react-workspaces

abrkn commented 4 years ago

@neilime Are you able to use TS code in the components library? I get this error https://github.com/cmsd2/react-workspaces-playground/pull/1

abrkn commented 4 years ago

@F1LT3R 🥇 I simplified your code and released CRA without fork or eject as host monorepo package. With rollup as bandler for packages. With Typescript compatibility. Enjoy

But how can you then work with many CRA apps?

Same issue. @comerc example does not help with multiple CRA.

F1LT3R commented 4 years ago

Same issue. @comerc example does not help with multiple CRA. - @abrkn

I've been working on adding TypeScript examples in this PR: https://github.com/react-workspaces/react-workspaces-playground/pull/21

I've checked Hot-Reloading of the TypeScript components and everything seems to be working well. It should work with multiple CRA apps.