Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to map require's to loaded JS deps #95

Open
chr15m opened this issue Dec 2, 2024 · 0 comments
Open

Ability to map require's to loaded JS deps #95

chr15m opened this issue Dec 2, 2024 · 0 comments

Comments

@chr15m
Copy link
Contributor

chr15m commented Dec 2, 2024

I'd like to import existing .cljs libraries I've written without recompiling Scittle and in a way that's compatible with existing shadow-cljs code. The things I am requiring often depend on js requires, which are resolved at compile time by shadow-cljs. To satisfy that I need something like an "importmap" which will tell Scittle how to resolve a require to the right JS object that is already loaded in a script tag. For example:

(:require
  ["something" :as something])

If we could tell Scittle that "something" actually resolves to window.SomeThingy then that would solve the problem.

You mentioned :load-fn which I'll investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant