fix(maestro): tie maestro-web recompile to web/dist + harden bundle build
Watch the embedded web/dist output (not just frontend inputs) so a rebuilt bundle is actually re-embedded; assert pnpm build produced web/dist/index.html; strengthen the embed test to require a vite-built hashed asset reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,4 +18,12 @@ async fn embedded_index_is_real_spa_not_placeholder() {
|
||||
!html.contains("maestro-web is running"),
|
||||
"served index is the placeholder, not the built bundle"
|
||||
);
|
||||
// Stronger signal than `id="app"` (which appears in both source and built
|
||||
// HTML): the vite build rewrites the entry to a hashed `/assets/index-<hash>`
|
||||
// bundle, whereas the un-built source references `/src/main.ts`. This catches
|
||||
// both an empty/placeholder embed and the staleness case.
|
||||
assert!(
|
||||
html.contains("/assets/index-"),
|
||||
"served index does not reference a vite-built hashed asset; got:\n{html}"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user