build.rs now builds web/dist before include_dir! evaluates, so the checked-in .gitkeep placeholder is no longer needed for a fresh checkout to compile (verified by building with web/dist entirely absent). Ignore dist/ wholesale and update the static_bundle doc comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
//! Embedded `web/dist` SPA bundle.
|
||||
//!
|
||||
//! The build of `web/` is consumed at compile time via `include_dir!`. The
|
||||
//! macro requires the directory to exist; an empty `web/dist/.gitkeep` is
|
||||
//! checked in so a fresh checkout compiles without first running `pnpm build`.
|
||||
//! The resulting binary just serves a 404 for `/` until the operator runs the
|
||||
//! frontend build (see top-level `Justfile`'s `web` target).
|
||||
//! The build of `web/` is consumed at compile time via `include_dir!`, which
|
||||
//! requires the directory to exist. `build.rs` runs `pnpm build` before the
|
||||
//! crate compiles, so `web/dist` is always present and populated — even on a
|
||||
//! fresh checkout (`web/dist` is gitignored and never committed). The
|
||||
//! placeholder below is therefore defensive only; a successful build always
|
||||
//! embeds the real bundle.
|
||||
|
||||
use axum::body::Body;
|
||||
use axum::http::{header, StatusCode};
|
||||
|
||||
Reference in New Issue
Block a user