shadow-cljs icon indicating copy to clipboard operation
shadow-cljs copied to clipboard

:push-state/index config option works only when no index.html is available in root directory

Open jackdbd opened this issue 3 years ago • 1 comments

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.

jackdbd avatar Aug 10 '20 09:08 jackdbd

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.

jackdbd avatar Aug 10 '20 09:08 jackdbd