leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
314 stars 87 forks source link

Add command to bundle everything up #243

Open DanielJoyce opened 3 months ago

DanielJoyce commented 3 months ago

Trying to figure out how to get all the pieces together to deploy a final artifact. Might make sense to have a command that will gather everything into a zip for easy deployment.

DanielJoyce commented 3 months ago

Messing around, it seems some things are bundled in the server binary, and some things aren't, some things need to be copied and some things don't.

A few things here

  1. I think cargo-leptos should lean into convention over configuration
  2. I think it might be good to bundle everything into a single page as much as possible in the common case
  3. The steps for doing 2) should be expressed not in cargo-leptos, but a common dev script that cargo-leptos builds when it is used to generate a new project.
ALEZ-DEV commented 2 months ago

Hey,

Have you tried to create a Dockerfile instead ?

Or if you really want to create zip file, you can directly try to compile the project with this command : cargo leptos build --release -vv but I don't know if this include the static files in the binary

hope this help