boot-clj / boot-clj/boot-cljs

clsjsjs `require` compiled to absolute path

Open
#180 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
176
Forks
40
PR merge metrics
No merged PRs in 30d

Description

I've run into a problem using CLJSJS packages in a Node.js target that I _think_ is a `boot-cljs ` issue: the `require [cljsjs.foo]` gets compiled to a `cljs.core.load_file` call with an absolute path, rather than a `goog.require`, so it can't be run outside of my development setup. It's entirely possible that I'm doing something dumb, and if so a pointer would be appreciated, with my apologies.

I don't see the same behaviour with lein-cljs, but I can't actually get that running due to other compilation issues. I have a [repro case](https://github.com/sinistral/hellocljsjs) if that would be helpful.

Contributor guide

Open the contributing guide

Research direction

Start with the linked hellocljsjs reproduction and trace how `require [cljsjs.foo]` is compiled for a Node.js target. Compare the generated `cljs.core.load_file` behavior with the expected `goog.require`, then verify that the compiled output runs outside the development setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, javascript, node.js
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.