Shadow-cljs: [Question] meaning of :bootstrap

Created on 13 Nov 2017  路  4Comments  路  Source: thheller/shadow-cljs

Based on the configs in:

https://github.com/mhuebert/shadow-bootstrap-example/blob/master/shadow-cljs.edn#L8

does it mean :bootstrap only works in :browser? How about :nodejs? Are there any other options related to :bootstrap?

All 4 comments

:bootstrap only compiles "support" files for other builds that want to use the self-hosted compiler. It has no other purpose or options.

The "host" build, meaning the build that actually uses the compiler, will then load those files at runtime. This "bootstrapping" process is currently only implemented for the Browser.

One could rewrite this https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/bootstrap/browser.cljs and replace all the browser-specific stuff to use node "fs" calls directly. It does not do much and only serves as a reference implementation. I suggest building your own depending on your use case.

If we can compile :bootstrap target to Node.js , does it mean we could make a replacement for Lumo?

Not sure what you mean by "we could make a replacement". You could write something like lumo yes. Build a self-hosted version of shadow-cljs no, not even close.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cark picture cark  路  8Comments

piotr-yuxuan picture piotr-yuxuan  路  10Comments

jiyinyiyong picture jiyinyiyong  路  6Comments

thheller picture thheller  路  6Comments

vinurs picture vinurs  路  7Comments