This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-07
Channels
- # announcements (4)
- # babashka (59)
- # beginners (26)
- # calva (34)
- # clj-kondo (3)
- # cljs-dev (1)
- # clojure (77)
- # clojure-austin (4)
- # clojure-europe (20)
- # clojure-nl (2)
- # clojure-norway (11)
- # clojure-spec (3)
- # clojure-uk (4)
- # clojurescript (103)
- # community-development (2)
- # cursive (15)
- # datalevin (12)
- # datascript (38)
- # datomic (1)
- # deps-new (2)
- # events (3)
- # figwheel-main (6)
- # fulcro (9)
- # honeysql (12)
- # jobs (4)
- # juxt (18)
- # kaocha (19)
- # lsp (42)
- # missionary (2)
- # pathom (14)
- # polylith (6)
- # portal (6)
- # reagent (8)
- # reitit (4)
- # releases (2)
- # shadow-cljs (17)
- # testing (1)
- # tools-deps (50)
- # vim (46)
- # xtdb (12)
I'm trying to use some JS code which is intended for use with node.js (client-side code) but I'm not keen on using node and would prefer to use figwheel to shadow-cljs, but I'm getting Uncaught SyntaxError: import declarations may only appear at top level of a module
from one of the dependencies in my :foreign-libs
. Must I give in or is there some hope that I could get it working with figwheel ?
What are you trying to do? That error doesn't seem related to figwheel.
well, I'm trying to use :foreign-libs
which would normally be used with shadow-cljs
as node.js modules
(as I explained above)
in case anyone reads this, I think that error was caused by trying to use JS code which needs to be transformed as with https://clojurescript.org/reference/javascript-library-preprocessing -- I can't find in Figwheel's documentation whether it supports this
specifically, code that has import { Something } from '../path/to/Something.js';
needs to be transformed to resolve its dependencies which requires that preprocessing step. No mention of preprocessing on http://figwheel.org that I could find