-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-native-css-interop cache is huge due to safelist in tailwind config #2472
Comments
Breaking down this quote Quote: nativewind/nativewind#1071 (comment)
NativeWind has already started added support for I don't have tests for the other operators, but I think they should be working https://github.com/nativewind/nativewind/blob/03b78ce3519d6d832b45b4f9977058d1c4c36654/packages/react-native-css-interop/src/runtime/native/conditions.ts#L391-L447 We use |
Thanks @marklawlor, This will reduce our size css file size by |
@evelant support for |
Description
Using the tailwind.config.js from gluestack-ui-v2
node_modules/react-native-css-interop/.cache/android.js
is a 4.3MB minified js file that takes ~250ms to load on app start. That is a significant chunk of load time.CodeSandbox/Snack link
https://github.com/evelant/css-interop-large-cache-example
Steps to reproduce
Copied from issue filed at nativewind here: nativewind/nativewind#1071
Describe the bug
Using the tailwind.config.js from gluestack-ui-v2
node_modules/react-native-css-interop/.cache/android.js
is a 4.3MB minified js file that takes ~250ms to load on app start. That is a significant chunk of load time.Is this intended or expected behavior? Does it come with a runtime performance penalty beyond the loading of the large file?
If this is expected behavior maybe a warning should be added to the docs.
Reproduction
https://github.com/evelant/css-interop-large-cache-example
observe that
node_modules/react-native-css-interop/.cache/android.js
is very large and that it slows down app load significantlyExpected behavior
Nativewind adds little/no overhead to app loading and runtime
Additional context
nativewind/nativewind#1071 (comment)
nativewind/nativewind#1071 (comment)
gluestack-ui Version
latest
Platform
Other Platform
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: