Commits
Tarun Sukhani authored d7f01a827aa
docs: explain how the packaged Nuxt SPA is served playFrontendSpa copies the generated frontend into public/spa/ and both play dist and play bundle ship it, but nothing said how it is meant to be reached — and the obvious guess is wrong in a way that reads as a bug. Nuxt generates the build for the site root, so its markup references /_nuxt/... ; opening /public/spa/index.html through Play's staticDir:public route therefore loads the page while every script and stylesheet 404s. The intended arrangement is the reverse proxy serving public/spa/ at / with Play handling the API paths underneath. Adds a "Serving the Nuxt frontend" section under "Behind a reverse proxy" with the nginx location blocks, including the try_files ... /index.html fallback that makes client-side deep links work, plus the NUXT_APP_BASE_URL=/public/spa/ alternative for serving it from Play instead. Both were verified — the first against a real prod-mode app (server: Play! Framework;1.13.67;prod), the second against a scratch skel build — rather than written from what the config looked like it should do. Also records the same in CLAUDE.md, since the packaging notes there describe where the SPA lands but not where it is served, which is what led to it being reported as a defect in the first place. Drive-by: samples.textile documented "play new myapp --frontend nuxt", but the shim parses --frontend as a bare flag (its own usage string is "play new <name> [--frontend] [--dest=<path>]"), so the trailing argument is wrong. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JTvjeSmGVe7RFyx8ZJXRAx