dioxus
dioxus copied to clipboard
`_TAILWIND_URL` returns `Failed to add asset: No such file or directory (os error 2)`
Problem
const _TAILWIND_URL: &str = manganis::mg!(file("public/tailwind.css"));
it returns Failed to add asset: No such file or directory (os error 2).
Steps To Reproduce
Steps to reproduce the behavior:
-
dx new - pick
Webfor sub-template, add project name, pickTailwindfor creating CSS, picktruefor use Dioxus router. - followed all instructions of https://dioxuslabs.com/learn/0.5/cookbook/tailwind
Expected behavior
error doesn't appear.
Screenshots
in addition to screenshot. i've tried some additions to Dioxus.toml. and below is my setting. Even with the default settings, changing the settings still doesn't make the error go away.
[application]
# App (Project) Name
name = "client"
# Dioxus App Default Platform
# desktop, web
default_platform = "web"
# `build` & `serve` dist path
out_dir = "dist"
# resource (assets) file folder
asset_dir = "assets"
[web.app]
# HTML title tag content
title = "client"
[web.watcher]
# when watcher trigger, regenerate the `index.html`
reload_html = true
# which files or dirs will be watcher monitoring
watch_path = ["src", "assets", "public"]
# include `assets` in web platform
[web.resource]
# CSS style file
style = ["public/tailwind.css"]
# Javascript code file
script = []
[web.resource.dev]
# Javascript code file
# serve: [dev-server] only
script = []
Environment:
- Dioxus version:
v0.5 - Rust version:
rustc 1.80.0-nightly (1fffb2a35 2024-04-28) - OS info: MacOS Sonoma v14.4.1
- App platform: Web
Questionnaire
- [x] I'm interested in fixing this myself but don't know where to start
- [ ] I would like to fix and I have a solution
- [ ] I don't have time to fix this right now, but maybe later