Fork me on GitHub
#cljs-dev
<
2020-05-19
>
bhauman15:05:08

@dnolen so are you getting around the problem of not knowing where a bundler will output its bundle file by having a convention of having it deployed to output-dir + “main.js” ? I.e. the browser-repl, default-main and index.html all rely on a bundler outputting to main.js

bhauman15:05:15

just checking because I’m wresting with this lack of knowledge as well, and if this is going to be the convention going forward, figwheel might as well conform to it

bhauman15:05:25

after a review of the code this seems to be what’s happening

dnolen16:05:59

browser-repl used to look at :output-to and that was broken in the :bundle case, so it doesn't anymore

dnolen16:05:46

browser-repl attempts to load main.js but this is a result of the default index.html not browser REPL really

dnolen16:05:05

if you supply index.html it can be anything

dnolen16:05:16

default-main doesn't look for anything by default as you don't need to look for anything for REPLs

dnolen16:05:31

default-compile sets :output-to to main.js if none supplied

dnolen16:05:18

that enumerates the cases a bit

dnolen16:05:16

but to directly answer your question - nothing in ClojureScript itself needs to know about the bundle output file

dnolen16:05:25

since that is up to the user how it gets loaded (i.e. a script tag in the browser)

dnolen16:05:12

for Figwheel if it simplifies by following a convention I don't see why not - but ClojureScript simply doesn't address the problem at all - it just ignores it