search

Home  >  Q&A  >  body text

Apply downwind inline styles to components imported from library

I'm building a React component library using TailwindCSS and I'd like to know if there is a way to compile the library component's styles (in node_modules) with the consuming application's styles without having to use each Each application adds the relative path to the component to the content field of its tailwind.config.js. After looking at the preset's documentation, it seems that if I just add it to the library's preset, it will be overwritten by the application's custom configuration.

P粉742550377P粉742550377437 days ago642

reply all(1)I'll reply

  • P粉262073176

    P粉2620731762023-09-07 00:30:24

    I ended up following @Wongjn's suggestion and created a function to modify the custom Tailwind configuration to add the module to the content field.

    reply
    0
  • Cancelreply