So we want to start a new project having a monorepo with every component as a separate project.
i.e.
App (repo)
-- Button (project)
-- -- package.json
-- Radiobutton (project)
-- -- package.json
tailwind.config.js
What we'd want to do is having a single tailwind config and be able to have a build per component run through the main package.json
in App. So that we minimize the css classes left in Button
for instance.
Basically a css class should be generated for Button
containing only the classes used there.
Similarly it would happen for RadioButton
having everything completely separate.
Has anyone got an idea of an approach to this?
I can find info on monorepo's but not in combination with tailwind specific covering multiple projects given that we don't want to have a config file in each project.
Output would then be:
dist/App
-- Button
-- -- Button.jsx
-- -- Button.css
-- Radiobutton
-- -- Radiobutton.jsx
-- -- Radiobutton.css
question from:
https://stackoverflow.com/questions/66046889/tailwind-config-build-tools-in-monorepo 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…