4 ms·
It really depends on how generalised your component libraries are. If you want to customise the color palette, you will need to use the same color classes in al
by stefanfisk 6y ago
It really depends on how generalised your component libraries are. If you want to customise the color palette, you will need to use the same color classes in all libraries, which requires that the `colors` part of the config matches everywhere. Using a shared base config is probably a good start at least.
As purging is only done for production builds, the purge content paths only need to be defined in that projects config. If you are using components from `node_modules` then you should add their paths to `purge.content`.
- midrus 6y agoYes, but this wouldn't work either. I can add the node_modules/my-library path to be purged, but that means that I still will get included in my application EVERY class used in the component library, despite I might be using just every component or not. This is a major shortcoming for using tailwind in a company/corporate context in my opinion. I still like it for my own side projects though.
- stefanfisk 6y agoI think you’ll find that there’s a common subset of classes that are used by most components, and that you quickly reach a point where adding new components hardly alters the built css file at all.