Hello! First of all, thanks for your great work!
I have a problem with configuring :mode :serve
though. The documentation says:
If you want to start a Figwheel build without a REPL you will need to ensure that the :mode option is :serve. You can do this in the metadata in the build file or you can supply a replacement for the figwheel-main.edn [...]
So first I tried modifying my figwheel-main.edn
:
{:open-url false
:mode :serve}
Then I run either lein fig -- --build dev
or (figwheel.main.api/start "dev")
from the repl. And I can see that the config file is ok because :open-url false
truly works as expected. But it still doesn't go to the :serve
mode.
dev.cljs.edn
:^{:mode :serve}
{:main following-documentation.core
:output-dir "target/public/js"
:output-to "target/public/js/main.js"}
(figwheel.main.api/start {:mode :serve} "dev")
And that worked. But that way my :open-url
config from figwheel-main.edn
doesn't work anymore. So I assume that that inline config makes figwheel-main.edn
to be ignored. Is that expected?But again, that inline config isn't my first choice anyway. I'd rather use figwheel-main.edn
or dev.cljs.edn
for that.
In the documentation I found this sentence:
> Server only mode is entered when specify `--serve` or `-s` as the only main option to `figwheel.main`
I tried removing all config from figwheel-main.edn
and leave only {:mode :serve}
but that didn't work either.
Oh, pardon me, the metadata config in dev.cljs.edn
worked:
^{:mode :serve}
{:main following-documentation.core
:output-dir "target/public/js"
:output-to "target/public/js/main.js"}
So that leaves only the figwheel-main.edn
that didn't work 😐