fydellys/inertia-static
A Laravel package that adds static site generation to Inertia.js apps, rendering existing pages to HTML for fast, SEO-friendly, cacheable deployments while keeping your Inertia components and Laravel workflow intact.
Architecture fit
inertia-static:manifest, inertia-static:doctor), a Vite build plugin, and an Inertia.js client that consumes a generated resources/js/inertia-static.json for static route resolution.php artisan in the same environment.Integration feasibility
vue-tsc/tsc runs, and requires the CI job to have a working PHP runtime and a bootable Laravel app at Vite build time.inertia-static:doctor command is a genuinely useful adoption lever: it is a cheap, self-serve preflight check (verifies .gitignore hygiene) that reduces the support surface for platform teams.Technical risk
vite build previously degraded gracefully (shipped a client without static routing); it now fails hard when inertia-static:manifest can't run. Any existing pipeline where the manifest step was flaky, unconfigured, or silently skipped will now go red — this is a correctness win but a pipeline-breaking event for current adopters. vite dev and tests still only warn, so the failure is asymmetric and will not be caught locally.resources/js/inertia-static.json is now explicitly a build artifact: must be .gitignored and regenerated in CI. Consumers who currently commit it face a two-sided problem — a noisy rewrite on every build and a formatter/vue-tsc fight on a tracked generated file.Key questions
inertia-static:doctor limited to .gitignore checks, or will it validate the manifest step, PHP/Node co-location, and TypeScript ordering? Can it be extended or is it opinionated?Stack fit
vue-tsc or tsc in the pipeline). Non-TypeScript Inertia apps still work but forfeit the main reason to generate the manifest before the typecheck step.Migration path
^0.4.0 explicitly; do not float on 0.x.resources/js/inertia-static.json to .gitignore and git rm --cached it. Run the formatter once after removal to clear lingering diffs.php artisan inertia-static:manifest → vue-tsc/tsc → vite build.php artisan inertia-static:doctor as a required CI step (and ideally in the local setup script) so the .gitignore rule cannot regress.Compatibility
Sequencing
gitignore + doctor first (non-breaking, self-verifying) → CI reordering (non-breaking) → plugin upgrade to v0.4.0 (breaking) → remove any prior workarounds that tolerated a missing manifest. This ordering lets you prove the manifest is reliably generated before you enable the failure mode that depends on it.
Maintenance
Support
inertia-static:doctor is a first-line triage tool — document it in the onboarding runbook so teams self-serve instead of escalating.Scaling
Failure modes
| Mode | Symptom | Detection |
|---|---|---|
| PHP absent/broken in Node build stage | vite build fails hard (new) |
Build red; previously silent |
Manifest step not ordered before tsc |
Type errors or unresolved route types | vue-tsc failure |
.gitignore regressed |
Formatter diff / rewritten file every build | inertia-static:doctor |
| Stale committed manifest | Routes diverge from backend silently | Only caught by runtime tests |
| Dev/test leniency | Bug ships because only vite dev was exercised |
Production build only |
The dev/test-only-warn asymmetry is the most important operational risk: local green does not imply CI green. Require a production build in PR checks.
Ramp-up
doctor guides setup.^0.4.0, completing the .gitignore/CI-ordering migration first, and requiring a production build in PR checks.How can I help you explore Laravel packages today?