Fork me on GitHub

Hi Folks, I’m updating all my deps in a project, and build the figwheel-main config etc. from scratch as to be up to date with the latest way of doing things… But I stumple upon this:

import { nlNL } from 'date-fns/locale'
how to require this in my code?. The deps for this are in package.json I use :target :bundle in my dev.cljs.edn are there any more things to be done? what is the idiomatic way?


I see in my browser that ‘dateFns’ is available. But somehow getting into this submodule doesn’t work


But for these kind of problems: in theory you only need to add it to package.json, and require it in your code right? And then use :target :bundle


what do you get when you require it like this:

    [date-fns :as dfns])

(js/console.log dfns)
I'm not actually sure what the name of the library is, so you have to accommodate for that.


yeah that one works, but i can’t seem to get the locale submodule


import { nlNL } from 'date-fns/locale'
ie., the cljs equivalent of that. according to the docs it should exist


now I wondered, in my old setup I had some extra file that webpack used to expose the above nlNL module, and put that on the global window object


but I thought, that since I now use npm for everything, I could get rid of such a file an configurative overhead 🙂


What's in the namespace? Depending on the package you can dig into it and see what's there. I'm not by the comp so I can't test.