Has anyone tried building an :esm library that used tick? I’m stuck trying to figure out why
Uncaught ReferenceError: assignment to undeclared variable JSJodaLocale
happens. I saw this when I compiling
------ WARNING #1 - -----------------------------------------------------------
File: ~/.m2/repository/tick/tick/0.4.32/tick-0.4.32.jar!/tick/locale_en_us.cljc:5:31
--------------------------------------------------------------------------------
2 | #?(:cljs (:require ["@js-joda/locale_en-us" :as js-joda-locale])))
3 |
4 | ; doing this for the one-arity tick.format/formatter. (npm users don't get js/JSJodaLocale global automatically)
5 | #?(:cljs (set! js/JSJodaLocale js-joda-locale))
-------------------------------------^-------------------
so I thought importing that @js-joda/locale_en-us manually would solve the problem but that just moved the goal post to
Uncaught TypeError: root is undefined
Following up on this: we gave up on trying to build an ESM module. This isn’t tick’s fault though. 🙂
can you avoid including the locale ns?
fyi tick 0.5 changes things round a bit https://widdindustries.com/tick-is-out-of-alpha/
I’ll give this a shot.
ok, bummer! I've not tried making any esm modules myself
When I compile a :browser version of library it works fine.
But the moment I try to export anything from it I end up in this situation.
I’m willing to bet that the issue is trivial and I’m likely overlooking something or missing some information.