leptos
leptos copied to clipboard
source html in production
In the final html result ( checked using dev tools sources ) , Is there any way that I can make the content inside the body to be formatted instead of just being 1 line
For example:
leptos = { version = "0.4", features = ["nightly"] }
leptos_axum = { version = "0.4", optional = true }
leptos_meta = { version = "0.4", features = ["nightly"] }
leptos_router = { version = "0.4", features = ["nightly"] }
Could you elaborate a bit more?
Are you looking to format the HTML sent to the browser?
@rakshith-ravi yes , here's what I got ...
Body is 1 line ...
Not sure if this is a browser problem or with leptos
This is a very common industry practice to minify HTML to reduce the amount of data transferred over the wire. That being said, if you go to inspect element, your browser should show you a parsed version that you can fiddle around with.
Additionally, most browsers have a "pretty format" (or something along those lines) button that pretty-prints it for you.
What is your use-case for having a formatted HTML though, out of curiosity?
I'm going to treat this one as a feature request to pretty-print HTML in debug mode. I can see the use case for this, as I sometimes use View Source to check the original HTML in case there are discrepancies relative to the DOM inspector (this happens with things like multiple <body>
tags, etc.). But it's not something I'm going to put time into myself. Someone else is welcome to if they'd like!