-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unable to generate style names when compiled under :simple
optimizations
#7
Comments
Thanks for the report! This is indeed odd, and it's definitely not intended that we don't work under Looking at your sample project, it seems like the factory functions don't have a |
:simple
optimizations
Oooh okay. I was looking at the pre-optimization files, I guess. So what's happening is under yacwat_simple.styles.global_class_factory$=function(a,b){ /* ... etc */} Under yacwat_simple.styles.global_class_factory$ = (function yacwat_simple$styles$global_class_factory$(style_name20047,params20048){
/* ... etc */
}) and in function p_(a,b){ /* ... etc. */ } As background, to avoid having to embed a string with the style name (and consequently unnecessarily inflating the JS file in Since I'm assuming that closure will generate a function with a name, the way |
Hey so I just published version 1.0.4 which I believe fixes the issue. Please let me know how it works for you! |
Huzzah! It works! Thanks for the speedy response and fix! As an aside, I've been using this library successfully since its public debut, and it has been a joy to switch over to from css-modules and herb. Love the simplicity and flexibility it provides, and I've been a heavy advocate for it when the occasions arise in |
Your welcome! Glad to hear it's working :) Thanks so much! That means a lot. I started this because I was also a bit frustrated with the existing solutions, so I'm happy to see that others are enjoying it as much as I am :) |
Global styling via
defglobal
seems to not work with:simple
optimization. The weird thing is that global styles work just fine in:advanced
optimization.Here's a lightweight, sample project for your viewing convenience:
https://github.com/sansarip/yacwat-simple
You can change the
:optimization
level in theprod.cljs.edn
file to:simple
and then compile a jar that you can run withlein prod
- more detailed instructions in the README.Is this intentional / am I doing something wrong?
The text was updated successfully, but these errors were encountered: