cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
bhauman 2020-05-19T15:24:08.219Z

@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

bhauman 2020-05-19T15:25:15.220200Z

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

bhauman 2020-05-19T15:36:25.220900Z

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

dnolen 2020-05-19T16:15:59.222Z

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

dnolen 2020-05-19T16:16:46.223100Z

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

dnolen 2020-05-19T16:17:05.223500Z

if you supply index.html it can be anything

dnolen 2020-05-19T16:18:16.224100Z

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

dnolen 2020-05-19T16:18:31.224600Z

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

dnolen 2020-05-19T16:19:18.225300Z

that enumerates the cases a bit

dnolen 2020-05-19T16:20:16.226300Z

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

dnolen 2020-05-19T16:21:25.226900Z

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

dnolen 2020-05-19T16:23:12.228Z

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

dnolen 2020-05-19T16:23:21.228300Z

@bhauman ^

bhauman 2020-05-19T17:13:07.228600Z

gotcha