Skip to content

fix(docs-next): scope basePath to production#114

Merged
pratyush618 merged 1 commit intomasterfrom
fix/docs-next-base-path-dev
May 2, 2026
Merged

fix(docs-next): scope basePath to production#114
pratyush618 merged 1 commit intomasterfrom
fix/docs-next-base-path-dev

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

basePath: '/taskito' was set unconditionally in PR #111 (Phase 1) so the deployed GH Pages site at docs.byteveda.org/taskito would resolve correctly. Side effect: pnpm dev returns 404 at localhost:3000 because the dev server applies the basePath, so the home page lives at localhost:3000/taskito instead.

Wraps basePath with process.env.NODE_ENV === 'production' so:

  • Dev: localhost:3000 → home page (no prefix)
  • Production: /taskito prefix preserved (GH Pages URL unchanged)

Test plan

  • pnpm build — clean (production build still emits /taskito-prefixed paths)
  • Inspected out/index.html — still references /taskito/_next/... chunks correctly
  • Manual smoke: pnpm --dir docs-next dev and confirm localhost:3000 and localhost:3000/docs both render

`basePath: '/taskito'` is correct for the deployed GH Pages URL but makes
`pnpm dev` 404 at `localhost:3000` because the app moves to
`localhost:3000/taskito`. Apply the basePath only when NODE_ENV=production
so dev hits the root.
@pratyush618 pratyush618 merged commit dab7fde into master May 2, 2026
13 checks passed
@pratyush618 pratyush618 deleted the fix/docs-next-base-path-dev branch May 3, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant