Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
:npm-deps
to be true
as well as false
Releasing this to support nREPL changes
Daniel Compton did some great work solving the caching issues.
There is also a very confusing problem with lein trampoline on Windows
see issue #682. So I turned off the auto-trampoline feature for
Windows which allowed the for the elegent use of Rebel readline by
just calling lein figwheel
.
Windows users can still elect to use trampoline with figwheel and get the benefits of rebel-readline but the will have to call lein trampoline figwheel and this should be done with the knowledge that they may experience a classpath corruption issue.
A big thanks goes out to ClojuristsTogether.org and everyone who contributed for helping to make this work possible!
This release includes the biggest change that Figwheel has had in
quite a while. After 2 months of work I'm proud to release a version
of Figwheel that has Clojure readline support. Even if you always use
your editor REPL like me, you make want to try the REPL that lein figwheel
launches. You may find that its a handy tool to have around.
You can learn more about rebel-readline at https://github.com/bhauman/rebel-readline.
Don't forget this gets rid of the need for rlwrap
.
You can disable the Rebel readline by adding :readline false
to your
:figwheel
config.
This release requires that you use
[org.clojure/clojurescript "1.9.946"]
at least.
This release also, adds automatic support for projects that use Code Splitting. You should now be able to use code splitting and have Figwheel "just work".
Other changes:
:preloads
for figwheel client injectionFigwheel inherited a topo sort algorithm from the CLJS compiler. It turned out that this graph sorting algorithm missed a very important optimization, which is fixed in this release. If you have project that has a lot of namespaces and have experienced slower load times when you change a file that is deeper in your dependency chain, you should notice a big improvement when using this release.
Added JavaScript environment hooks for tools like re-natal
to
customize the websocket implementation and the script loading behavior.
improved topo-sort algorithm
CLJS compile option: the :entries
key is no longer required in the
:modules
configs
new :repl-eval-timeout
allows you to increase or lower the
Figwheel REPL eval timeout as a top level config setting
added goog.global.FIGWHEEL_WEBSOCKET_CLASS
to allow one to
override or supply a websocket implementation for the figwheel
client
added goog.global.FIGWHEEL_IMPORT_SCRIPT
to allow one to override
or supply a function to the figwheel client, that is responsible for
loading a namespace into the JavaScript runtime.
added two new namespaces that can be supplied the ClojureScript
compiler's :preloads
option.
The two namespaces are only different in that one set's up figwheel while the other both sets up and starts figwheel. These are currently meant to clean up how the figwheel client is injected into the build. The next release of Figwheel will do away with generating a small ClojureScript file to inject the Figwheel client into build.
figwheel.connect
which will take a configuration from
:external-tooling
> :figwheel/config
and supply a
figwheel.connect/start
function which contains the supplied
config options. This function is exported so that it can be easily
called from JavaScript.figwheel.preload
which simply calls the above figwheel.connect/start
function:preloads
compiler optionwrap-reload
was being used in an
embedded :ring-handler
.project.clj
before it has been
validated, I added some extra safe guards to protect against start up errorsfigwheel-sidecar/get-project-builds
which was removed in 0.5.4
its now here to stay.before (start-figwheel!)
only optionally took a configuration. Now it
takes optional build-ids as well.
So you can do this:
(start-fighweel! "dev" "admin")
And it will pull in the config from the environment and start autobuilding the supplied build ids.
Or you can supply a config and build ids ...
(start-fighweel!
{:figwheel-options {:server-port 4000}
:all-builds [{:id ...}]}
"dev" "admin")
I have also beefed up the error checking and feedback around this call.