Skip to content

Counter example fails to load js when the project name is non-ascii #5093

@1984204066

Description

@1984204066

Problem

I don't know if it is caused by my Linux environment, because it is very simple case, I totally copy demo from guide doc.
but click on buttons has no effect.
While back to dioxus 0.6.3 + dioxus-cli 0.7.2 can work. (dioxus0.7.0 may also work)

here is the code
`// main.rs
#[cfg(test)]
mod tests;
mod components;

use components::;
use purple_star::
;
// use libs::;
use once_cell::sync::OnceCell;
use std::collections::HashMap;
use std::sync::{Arc, RwLock};
use dioxus::prelude::
;

// const CSS: Asset = asset!("/assets/main-d2ee087f.css");
const CSS: Asset = asset!("/assets/main.css");

fn main() {
println!("Hello, world!");
// Init logger
// dioxus::logger::init(Level::INFO).expect("failed to init logger");
dioxus::launch(Demo);
}

#[component]
fn Demo() -> Element {
let mut count = use_signal(|| 0);

rsx! {
    h1 { "High-Five counter: {count}" }
    button { onclick: move |_| count += 1, "Up high!" }
    button { onclick: move |_| count -= 1, "Down low!" }
}

}
this is cargo.toml[package]
name = "紫微斗数"
version = "0.1.0"
edition = "2024"

[lib]
name = "purple_star"

[dependencies]
num_enum = "0.7.4"
once_cell = "1.21.3"
paste = "1.0.15"
strum = { version = "0.27.2", features = ["derive"] }
strum_macros = "0.27.2"
dioxus = { version = "0.7.2", features = ["fullstack", "logger" , "router"] }
serde_json = "1.0.145"
wasm-bindgen = "0.2.106"
web-sys = "0.3.83"
serde = { version = "1.0.228", features = ["derive"] }

[features]
default = ["desktop"]
web = ["dioxus/web"]
desktop = ["dioxus/desktop"]
mobile = ["dioxus/mobile"]

[profile]

[profile.wasm-dev]
inherits = "dev"
opt-level = 1

[profile.server-dev]
inherits = "dev"

[profile.android-dev]
inherits = "dev"
`
rustc --version
rustc 1.94.0-nightly (ba2142a19 2025-12-07)

Steps To Reproduce
dx serve --platform web

Steps to reproduce the behavior:

Expected behavior

Screenshots

Environment:

  • Dioxus version:
  • Rust version:
  • OS info:
  • App platform:

Questionnaire

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfullstackrelated to the fullstack crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions