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

next cargo-leptos (rewrite branch) config file #407

Open
luoxiaozero opened this issue Dec 17, 2024 · 0 comments
Open

next cargo-leptos (rewrite branch) config file #407

luoxiaozero opened this issue Dec 17, 2024 · 0 comments

Comments

@luoxiaozero
Copy link

luoxiaozero commented Dec 17, 2024

Organize config and commands for discussion.

Leptos.toml

cargo-leptos-version = "*"
release = false

# Custom scripts, e.g. `leptos run dev` `leptos run build-release`
[scripts]
dev = "leptos serve --config leptos.dev.toml"
build-release = "leptos serve --config leptos.release.toml"

[server]
# Specify which IP addresses the server should listen on.
host = "localhost"
# Specify server port.
port = 3000
# Automatically open the app in the browser on server start.
open = false
# File system watcher
default-watch = true
watch = ["Cargo.toml", "docs/**/*.md"]

# Configure custom proxy rules for the dev server.
[[server.proxy]]
match = "/api"
target = "http://localhost:8080"
# Changes the origin of the host header to the target URL.
change-origin = false
ws = false

[build]
# The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name
output-name = ""
# The site root folder is where cargo-leptos generate all output. WARNING: all content of this folder will be erased on a rebuild. Use it in your server setup.
output-dir = "target/site"
# The output-dir relative folder where all compiled output (JS, WASM and CSS) is written
assets-dir = "assets"
# Copy to the root directory of output-dir and are always served or copied as-is without transform.
public-dir = "public"

[build.csr]
lib = false
default-args = true
args = []
target = "wasm32-unknown-unknown"
default-features = false
features = ["csr"]

[build.ssr]
lib = false
default-args = true
args = []
default-features = false
features = ["ssr"]

[build.hydrate]
lib = true
default-args = true
args = []
target = "wasm32-unknown-unknown"
default-features = false
features = ["hydrate"]

scripts

leptos new --template leptos-rs/start-axum
leptos new --template https://github.com/leptos-rs/start-axum
leptos new --template DioxusLabs/dioxus-template --subtemplate Desktop
leptos new --template https://github.com/DioxusLabs/dioxus-template --subtemplate Desktop

// Using leptosfmt
leptos fmt

leptos serve csr
leptos serve ssr
leptos serve ssr --no-hydrate

leptos build csr
leptos build ssr
leptos build ssr --no-hydrate
leptos build hydrate
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