Comments (4)
I expect serve to also build. Other tools do the same. trunk serve
or cargo run
also compile first if the project isn't compiled yet.
Running build before serve could be a work-around, yes.
from cargo-leptos.
from cargo-leptos.
The serve command actually does exactly what I need for static site generation. The name might not really fit, but the functionality is correct. It compiles the bin for the native target and the frontend for WASM. Then it runs the binary. For a SSR app the binary will start the actix/axum server. In the case of SSG, it will generate the html files of static routes.
This issue is really only about the return code of the command. Even if you use cargo leptos serve
for a "normal" SSR app, and one of the two compilations fail, the command will return 0 instead of some error code.
from cargo-leptos.
I should say that serve building the package is at best an oversight and at worst a bug, as serve really is only supposed to serve an existing binary. Is it possible to solve your use case by running build first to catch compilation errors, and then serve? Or is there another level of runtime errors you're hoping to catch around generation?
from cargo-leptos.
Related Issues (20)
- Cannot Create New Project from Template with .gitconfig in place HOT 4
- Proposal for update of program flow HOT 2
- Installing cargo leptos produces warning about yanked dep in log HOT 2
- When using a plain css style sheet, lightning should be configured to bundle in any @import style sheets HOT 1
- Opaque error message for weird CSS input HOT 4
- Provide way to disable minification as Lightning CSS can break css when minified HOT 5
- `cargo leptos watch` ignores `bin-target-tripple` HOT 5
- Add command to bundle everything up HOT 2
- Pass command line arguments to bin in `cargo leptos watch`?
- Incorrect help message for very verbose option HOT 2
- Issue with `ahash` library v0.7.7 (unknown feature `stdsimd`) HOT 9
- [proposal] Add pure rust tailwind integration alternative (encre-css) HOT 1
- Tailwind runs although it shouldn't HOT 10
- `build` command unsuable due to naming issues HOT 6
- Problem with ahash-0.8.3/src/lib.rs:99:42 - error[E0635]: unknown feature `stdsimd` HOT 2
- Warn about invalid `package.metadata.leptos` parameters
- Allow wasm-opt args to be configured
- cargo-leptos should check that the project name doesn't conflict with the names of dependencies
- `hash-files` breaks tailwind hot reloading HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-leptos.