Skip to content

Ability to set BaseURL on call to next() #2452

@rgbkrk

Description

@rgbkrk

I'd like to be able to host a next.js app on it's own base path (e.g. /some/base/path/ - on a configurable http proxy). This is primarily for use with JupyterHub to run as a separate service (on e.g. /services/nextApp). I've gotten everything to work for the express app (that uses next handlers underneath) as well as the frontend's handling of the paths (the req.params -> query -> page/component are awesome with next.js).

The only issue I'm running into is that _next is assumed to be at the absolute path of /_next when it needs to be able to be served at /some/base/path/_next.

const app = next({ dev, baseURL: '/asdf' });
  • I have searched the issues of this repository and believe that this is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions