Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LeptosOptions output_name is always leptos_config #3268

Open
gauravjuvekar opened this issue Nov 20, 2024 · 0 comments
Open

LeptosOptions output_name is always leptos_config #3268

gauravjuvekar opened this issue Nov 20, 2024 · 0 comments

Comments

@gauravjuvekar
Copy link

/// The name of the WASM and JS files generated by wasm-bindgen. Defaults to the crate name with underscores instead of dashes

The docs claim this refers to the crate name, but because crates are compiled independently, this name is always "leptos_config".
Should it be changed to CARGO_PKG_NAME instead?

MRE

#Cargo.toml

[package]
name = "repro"
version = "0.1.0"
edition = "2021"

[dependencies]
leptos = { version = "0.6.15" }
// src/main.rs

fn main() {
    use leptos::*;

    println!("Crate name is {}", env!("CARGO_CRATE_NAME"));

    let options = LeptosOptions::builder().build();
    let default_options = LeptosOptions::default();

    println!("Options output name is {}", options.output_name);
    println!("Default options output name is {}", default_options.output_name);
}
$ cargo run -q
Crate name is repro
Options output name is leptos_config
Default options output name is leptos_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant