This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-14
Channels
- # ai (3)
- # babashka (45)
- # beginners (81)
- # biff (26)
- # calva (10)
- # cider (5)
- # clj-kondo (55)
- # cljfx (6)
- # clojure (125)
- # clojure-berlin (1)
- # clojure-europe (37)
- # clojure-italy (7)
- # clojure-nl (3)
- # clojure-norway (79)
- # clojure-uk (1)
- # clojurescript (63)
- # clojutre (1)
- # conjure (5)
- # cursive (37)
- # data-science (1)
- # datalevin (4)
- # datomic (28)
- # eastwood (6)
- # fulcro (26)
- # graphql (20)
- # honeysql (6)
- # humbleui (4)
- # jobs-discuss (5)
- # kaocha (1)
- # leiningen (8)
- # missionary (5)
- # nbb (4)
- # observability (3)
- # off-topic (7)
- # pathom (8)
- # podcasts-discuss (1)
- # rewrite-clj (18)
- # ring (6)
- # sci (23)
- # scittle (9)
- # shadow-cljs (49)
- # squint (10)
- # testing (11)
- # xtdb (17)
Here is my first try using Remix through Squint: https://github.com/MTrost/remix-squint
Biggest obstacle right now is using CLJS standard library functions breaks the Remix build because of unsupported require
statements in the build:
Error [ERR_REQUIRE_ESM]: require() of ES Module /node_modules/squint-cljs/core.js from /build/index.js not supported.
Instead change the require of core.js in /build/index.js to a dynamic import() which is available in all CommonJS modules.
Additional observations:
1. .mjs
files are not supported as valid files inside the routes
folder. .jsx
is okay so putting #jsx
inside those files kind of solves that.
2. Generally I was surprised by how simple it was. But it’s just using the Remix starter which is a very simple example.
I will try a deploy to CloudFlare in the coming days.
@ULA8H51LP
0. Core functions: require statements? Who wrote these? Maybe you can try "type": "module"
in package JSON?
1. We could make the extension configurable, would that help?
re 0.: I think that’s a Remix problem, will keep you posted. 1. That would help for sure, but it’s not a urgent at all right now
Yes, it’s a problem of Remix and ESM only packages: https://remix.run/docs/en/v1/pages/gotchas#importing-esm-packages
type: module
in package.json does not solve it unfortunately. The solution mentioned in the Remix docs also doesn’t work and scanning the Remix Discord it looks like there are other ESM only libs not working as they should.
Javascript module system is quite a dumpster fire right now and many libraries ship CJS and ESM code in order to be used from anywhere else.