v0.14.21
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Frontend JavaScript sources
|
||||
|
||||
`build.rs` concatenates the files listed in `APP_JS_MODULES` into one generated `app.bundle.js` in Cargo's `OUT_DIR`.
|
||||
The server exposes that bundle as `/app-<content-hash>.js`, so the browser downloads one application script and can cache it immutably.
|
||||
|
||||
Source responsibilities:
|
||||
|
||||
- `router.js` owns application URLs, browser history, route parsing and URL-to-view mapping.
|
||||
- `navigation.js` owns view/tab UI transitions and navigation-related controls.
|
||||
- the remaining files are split by feature or shared responsibility.
|
||||
|
||||
The Rust HTTP router serves `index.html` only for the explicitly supported SPA routes. Unknown paths return the standalone `web/404.html` page with HTTP `404` instead of silently opening the dashboard.
|
||||
|
||||
`web/app.js` is intentionally not used and should not exist. Do not recreate it manually; the bundle is generated at build time.
|
||||
|
||||
Keep the module order in `build.rs` explicit. These files intentionally share one application scope and are bundled before being served to the browser.
|
||||
Reference in New Issue
Block a user