Skip to content

Styles not being applied on components imported from an external package #6056

Discussion options

You must be logged in to vote

Hey! Thank you for your question!
Much appreciated! 🙏

I'm assuming that you are using JIT mode here (otherwise everything was generated for you – unless you purged).
However, JIT mode works by scanning your source files for Tailwind classes. This means that inside your purge paths you have to include the paths to your components form your library. ./node_modules/react-component-library/**/*.js for example.

This means that you have to do that for every project you are using that library in.
Alternatively, you can also create a tailwind.config.js file inside your package that already contains the correct paths. If you have that, than you can use the presets features and include that config …

Replies: 7 comments 11 replies

Comment options

You must be logged in to vote
3 replies
@jquense
Comment options

@RobinMalfait
Comment options

@vinayraghu1
Comment options

Answer selected by fmazanerdwallet
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hasanm95
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@0tuedon
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@0tuedon
Comment options

@beautyfree
Comment options

@0tuedon
Comment options

@beautyfree
Comment options

@0tuedon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
10 participants