What happened?
Using Uniwind outside Expo with just Vite and React Native Web will cause dynamically generated theme class with the dark: prefixes to be bugged with the following error:
[vite] Internal server error: [lightningcss] failed to deserialize; expected an object-like struct named Specifier, found ()
The dark: token will break the build if it is detected anywhere by the static analysis, meaning even inside:
- Code comments
- Unreferenced files
- Even the
README.md!
Steps to Reproduce
- Clone the reproduction repo
- Prefix
dark: to any dynamically generated Tailwind class that index.css specifies, such as dark:text-muted
// src/main.tsx
<Text className="flex justify-center p-10 text-foreground text-6xl dark:text-muted">
Hello World
</Text>
Snack or Repository Link
https://codeberg.org/mkcodes/vite-uniwind-dark/
Uniwind version
1.7.0
React Native Version
N/A
Platforms
Web
Expo
No
Additional information
What happened?
Using Uniwind outside Expo with just Vite and React Native Web will cause dynamically generated theme class with the
dark:prefixes to be bugged with the following error:The
dark:token will break the build if it is detected anywhere by the static analysis, meaning even inside:README.md!Steps to Reproduce
dark:to any dynamically generated Tailwind class thatindex.cssspecifies, such asdark:text-mutedSnack or Repository Link
https://codeberg.org/mkcodes/vite-uniwind-dark/
Uniwind version
1.7.0
React Native Version
N/A
Platforms
Web
Expo
No
Additional information