Skip to content

how to access the homepage /path from within the app? #956

Closed
@godmar

Description

@godmar

In the documentation it says to use the 'homepage' property in package.json to produce builds that are not mounted at the server root.

How do I access the pathname portion of this property in the application?
I need to use it, for instance, inside <Route> declaration:

<Route path={?homepage.path?} .... />

Similarly, when interacting with react-router's functions, I need to access it.
I'd like this to be DRY. Thank you.

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