Skip to content

feat: export tailwindconfig tokens#720

Open
ruchamahabal wants to merge 1 commit into
frappe:mainfrom
ruchamahabal:export-tokens
Open

feat: export tailwindconfig tokens#720
ruchamahabal wants to merge 1 commit into
frappe:mainfrom
ruchamahabal:export-tokens

Conversation

@ruchamahabal
Copy link
Copy Markdown
Member

@ruchamahabal ruchamahabal commented May 21, 2026

Move inline tokens to tailwind/tokens.js and export them from package.json to allow other projects to import and use them. Need this for Studio ref

I was using resolveConfig to do this earlier, but now it breaks because the preset in tailwindconfig imports lucideIconsPlugin.js, which uses createRequire - a Node-only API that doesn't work in the browser. Also, it was not ideal to do so. Tailwind suggests writing tokens in a js file and using/exposing them for external use.

If there is a better way to do this, please let me know

Coverage

Metric Coverage Δ vs main
Lines 48.92% (5047/10315) ±0.00%
Statements 46.18% (5160/11173) ±0.00%
Functions 47.13% (1470/3119) ±0.00%
Branches 40.14% (2359/5876) ±0.00%

Baseline pulled from the latest successful main run.

@netchampfaris
Copy link
Copy Markdown
Contributor

@ruchamahabal It's fine for now. Will have to find a better way when we migrate to Tailwind 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants