packages
packages copied to clipboard
fail to link css file in html file
my folders tree like:
C:.
│ deps.edn
│ dev.cljs.edn
│
├───resources
│ └───public
│ index.html
│
└───src
└───hello_world
core.cljs
my deps.edn
{:deps
{
cljsjs/react-dom {:mvn/version "17.0.2-0"}
cljsjs/react {:mvn/version "17.0.2-0"}
reagent {:mvn/version "1.1.0"}
cljsjs/antd {:mvn/version "4.6.1-0"}
com.bhauman/figwheel-main {:mvn/version "0.2.16"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
org.slf4j/slf4j-simple {:mvn/version "1.7.36"}
}
:paths ["src" "target" "resources"]}
my dev.cljs.edn
{:main hello-world.core}
my resources\public\index.html
<!DOCTYPE html>
<html>
<head>
<link href="cljsjs/antd/production/antd.min.inc.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="app"></div>
<script src="cljs-out/dev-main.js"></script>
</body>
</html>
my src\hello_world\core.cljs
(ns hello-world.core
(:require [antd :as antd]
[reagent.core :as r]
[reagent.dom :as rdom]))
(defn c [] [:> js/antd.Calendar])
(rdom/render [c] (js/document.getElementById "app"))
and I start with command
clojure -M -m figwheel.main -b dev -r
but the result is without css
how can I use the css file?
the antd README.md say
Figwheel main serves files from the classpath prefix "public/". Cljsjs files aren't under that path so they aren't accessible at least with the default figwheel-main configuration.
https://github.com/bhauman/figwheel-main#classpaths-classpaths-classpaths
It actually serves any file it finds on the Classpath in a public sub-directory.
Should I copy cljsjs/antd/production/antd.min.inc.clss
from in jar to resources/public/
?
It's awkward...