pwrdrvr/microapps-core

microapps-router-lib - Route `_next/data` requests for apps without basePath

Closed this issue · 1 comments

Motivations

  • Next.js apps with basePath set are complicated to get working correclty
  • Leaving basePath unset, but setting assetPrefix should allow multi-page apps to be hosted on the same domain

Example Client-Side Nav Request

https://apps.ghpublic.pwrdrvr.com/_next/data/0.0.0-pr.37/nextjs-demo/posts/ssg-ssr.json?id=ssg-ssr

Acceptance Criteria

  • Parse the app name after _next/data if it comes at the root of the deployment
  • Route requests using that app name
  • Remove the basePath setting from the Next.js Demo app to test

nextjs-demo without basePath: pwrdrvr/microapps-app-nextjs-demo#37