javascriptcssmonorepoturborepo

How to reuse a css file in a monorepo


I am using Turborepo, and am wondering if there is a way that I can create a common css file and reuse it. For example, given the below architecture,

apps/
 |- client/
    |- index.tsx
packages/
 |- ui/
    |- global.css
    |- index.tsx
    |- ...

How can I do something like this?

client/index.tsx:

import React from 'react';
import global.css from 'ui';

...

Solution

  • Try this:

    import "ui/global.css"