DEV Community

Discussion on: Monorepos: Lerna, TypeScript, CRA and Storybook combined

Collapse
 
travispomeroy profile image
FlatPenguin

Hi @shnyder,

This is a very good article and helping me a lot in understanding how to setup a Lerna, CRA, Typescript, and Storybook monorepo.

But one question I have, how would we incorporate pre-styled components into our Storybook? I would like to use Sass to give all of my shared components a default styling that could then be overridden by the client application if desired. So I'm assuming we would need to use Webpack at this point to build our lib directories instead of using tsc directly?

Sorry, thanks for your patience and time. I'm very new to front-end development and still trying to piece all the different technologies together.

Collapse
 
shnydercom profile image
Jonathan Schneider

Hi @FlatPenguin,

sorry for the late reply. If you're new to front-end development and don't want to use one of the css-in-js solutions have a look at the BEM-Notation for naming styles. It helps you structure your styles early on, even if you don't follow it 100%. With node-sass you can actually compile the sass into css and ship it with the rest of your library, so no need to ship scss