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

watch does not load style assets if the initial build fails #300

Open
luxalpa opened this issue Jun 17, 2024 · 0 comments
Open

watch does not load style assets if the initial build fails #300

luxalpa opened this issue Jun 17, 2024 · 0 comments

Comments

@luxalpa
Copy link
Contributor

luxalpa commented Jun 17, 2024

  1. Run cargo leptos watch in your project while there's some code error
  2. Fix that error
  3. The app that now loads doesn't have any CSS until you restart the watch.

This has been a surprisingly annoying issue for me. I think it's caused by

if !compile::front(proj, &changes).await.await??.is_success() {
return Ok(false);
}
if !compile::assets(proj, &changes, true)
.await
.await??
.is_success()
{
return Ok(false);
}
if !compile::style(proj, &changes).await.await??.is_success() {
return Ok(false);
}
where it just returns and doesn't load any assets if the build fails. Further style changes are only added iteratively.

I assume we can just run the compile::assets and compile::styles functions (and possibly others) regardless of success or failure. Maybe I'll drop a PR for this later.

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