shadow-cljs
shadow-cljs copied to clipboard
:push-state/index config option works only when no index.html is available in root directory
According to the shadow-cljs http development server documentation, the :push-state/index
config option instructs the http server to serve a custom html file from the root directory (e.g. public
).
As of shadow-cljs version 2.10.21
, this works only when no index.html
is available in root directory.
This issue was already described here, I am just reporting it here for better visibility.
A possible workaround could be to avoid keeping a index.html
in public
, and have a foo.html
instead. Then, when deploying the website, have a npm script hook called predeploy
which copies public/foo.html
to public/index.html
, and a postdeploy
hook that removes public/index.html
See npm pre and post hooks here.