Fork me on GitHub

@mitchelkuijpers I think issues like this really necessitate a bit of due diligence from ClojureScript users to determine root causes, I tried npm ls after installing styled-components


I see that fbjs is the only thing that needs core-js. The I grepped a checked out fbjs and saw that core-js is only used for Jest testing.


given that I don’t think that @anmonteiro’s analysis correct in this particular case - and your actual projects errors seem to reflect that.


@martinklepsch I don’t think that’s really possible - instead, I think we need to focus on educating users to troubleshoot and enumerate various paths forward - I’ve opened up an issue on the ClojureScript site to make sure we document typical problems and potential solutions


this also seems like another possible usecase for cljs-oss? automatically testing major node_modules JS libs against the Closure compilation model


@mitchelkuijpers yeah I spent some time looking at this - it’s definitely not clear what the issue is - goog.requiring the rule ns works after the fact


yeah, the answer is styled-components needs to updated its vendorized version of postcss (or stop vendorizing it) - the version it currently uses is jacked


this is going to be a common narrative - submit a simple PR to fix a mostly resolved issue


the problem was that the old vendorized postcss relied on dynamic require which leads to circular imports and build time hacks


@mfikes did you find another way around avoiding errors related to reloading namespaces with :const vars I noticed that the purge!-related code mentioned in that issue - - is no longer in the latest version of Planck.


@dnolen still thinking it makes sense to have an option to specify additional macros to be compiled (like core$macros) during a ClojureScript build?


@dnolen I think this need is also why Planck has this additional build step:


@mhuebert yeah the thing we discussed


@mhuebert No. Planck now exhibits errors when reloading namespaces with ^:const vars. The reason the workaround lines are no longer in Planck is that Planck is no longer defining require as a REPL special (with the built-in workaround), but instead delegating to the new require macro, and it thus subject to the issue as well.


@mfikes ah I see, makes sense


Thank you @dnolen maybe we should create a wiki or blogpost about figuring out these problems. Highly appreciated I will go with the pull request I think