소스 검색

Update tailwind examples to work with multi-page apps (#1339)

* Update tailwind example to work with multi-page apps

Use the absolute path to `tailwind.css` so the example works with multi-page apps. Without this change, the style disappears on page reload.

* Update tailwind Dioxus.toml to use absolute path for tailwind.css
Steven Pecht 1 년 전
부모
커밋
bdfb3b6285
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      examples/tailwind/Dioxus.toml
  2. 1 1
      examples/tailwind/README.md

+ 1 - 1
examples/tailwind/Dioxus.toml

@@ -30,7 +30,7 @@ watch_path = ["src", "public"]
 [web.resource]
 
 # CSS style file
-style = ["tailwind.css"]
+style = ["/tailwind.css"]
 
 # Javascript code file
 script = []

+ 1 - 1
examples/tailwind/README.md

@@ -81,7 +81,7 @@ watch_path = ["src", "public"]
 [web.resource]
 
 # CSS style file
-style = ["tailwind.css"]
+style = ["/tailwind.css"]
 
 # Javascript code file
 script = []