-
Notifications
You must be signed in to change notification settings - Fork 47
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
cljsjs/antd pulls in the whole of antd #7
Comments
Looking for a solution for this as well. The official instructions on how to use babel plugin are rather un-helpful for the use with antizer. |
Could someone give some tips on how to solve this problem? |
Sorry I can't help, but just wanted to chime in to say I'm also interested in the solution! |
After setting |
And how big is your final js file? |
The uncompressed JS is 1.2M, After gzip, It is only 479K. |
@gmp26 I am curious as to why you have That said, I cannot manage to get my styles working. Referencing I have tried searching including Is the recommended solution to extract the |
@wpcarro. The honest answer is I don't now know why I had [cljsjs/antd "2.12.3-0"] in there. I see that the current readme acknowledges cljs/antd but does not suggest adding it as a dependency. I ran out of time trying to understand the nuances of using antizer with clojurescript so am no longer using antizer. Maybe another project another day.... |
@wpcarro In quick start, it says to include css using CDN, so I think you can just ignore |
@jiacai2050 can you link to where you would be making the optimizations change... I wonder if this is the google closure compiler in action? Will keep my eye on this. |
@teesloane Nothing required, just set optimizations to advanced. |
@jiacai2050 -- in the |
Yes. |
Interesting. @jiacai2050 I created a test. I made a re-frame project and added antizer. I rendered a button like so:
I ran Then I used It re-frame + clojurescript + react really adding an extra 1.4 mb? I know it seems pedantic and unnecessary to be squabbling over this, but beyond getting smaller builds, I'd also like to make sure that I'm understanding how to use namespaces and the google closure compiler correctly |
The babel-plugin-import is developed for the JavaScript ecosystem. Hence, we can't get it to work in ClojureScript without creating or porting it over. Using closure with advanced Just a poll, how many users of antizer are interested in a ClojureScript only solution? |
I'm back to using antizer in an electron project where it is performing well. I'm possibly not so memory sensitive in this context, though I am still pulling in the whole of antd. I'd love to avoid a babel build! |
Shadow-cljs helps with js code, but it's hard to avoid pulling in 500K of SVG icons since these are referenced through attributes. e.g. (ant/button {:icon "download"}). See this gist: https://gist.github.com/gmp26/b01daec3df146dd5aff67d3b615d4cc6 And here's a shadow build report where I only required antd/es/button: |
Do let me know If there's a more appropriate channel to discuss user issues.
I'm starting from a leiningen project with the following dependencies:
which provokes the startup warning:
Does this mean that it would be better to avoid using cljsjs/antd and somehow build antd using webpack and babel-plugin-import? If so, perhaps some documentation on this would be useful.
The text was updated successfully, but these errors were encountered: