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.
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.