fix(shared-tailwind): export CSS under 'style' condition for Vite build

@tailwindcss/vite's enhanced-resolve looks for the 'style' export
condition when resolving CSS imports. The previous exports field used
plain string values which worked in dev but not in the Docker
production build (Vite build mode). Adding explicit 'style' +
'default' conditions fixes the "'sources.css' is not exported under
the condition 'style'" error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-16 13:39:01 +02:00
parent db4dd437bd
commit 3f60f68573

View file

@ -4,8 +4,14 @@
"private": true,
"type": "module",
"exports": {
"./themes.css": "./src/themes.css",
"./sources.css": "./src/sources.css"
"./themes.css": {
"style": "./src/themes.css",
"default": "./src/themes.css"
},
"./sources.css": {
"style": "./src/sources.css",
"default": "./src/sources.css"
}
},
"scripts": {
"lint": "eslint ."