BuilderIO / mitosis

Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
https://mitosis.builder.io
MIT License
12.23k stars 540 forks source link

Using Mitosis with Monorepo Tool (like Turborepo) #707

Open thedanchez opened 2 years ago

thedanchez commented 2 years ago

Looking to build a basic component-library using Mitosis that I would like to eventually distribute to internal users. If I wanted to leverage a monorepo tool to manage all the different packages, could I still use Mitosis?

Essentially, I want the Mitosis output to be the different target library packages that would then be published for download. I'm new to Mitosis so I could be thinking about this the wrong way entirely so feel free to course correct my thinking if it is.

samijaber commented 2 years ago

Builder's SDKs are built with Mitosis. Each output (Vue, Solid, React, React Native, Qwik, Svelte) ends up being its own NPM package that is published separately. We use yarn v3 workspaces to do that: https://github.com/BuilderIO/builder/tree/main/packages/sdks

Never used turborepo, but it might get the job done just as well. Take a look and see if our SDK codebase helps you