Skip to content

Allow to disable historyApiFallback on dev server #12506

@ia3andy

Description

@ia3andy

Is your proposal related to a problem?

I am the author of Quarkus Quinoa, a Quarkus extension to ease dev and deployment of NodeJS app on Quarkus (a Java Framework).

To allow a good development experience, Quarkus also have a live coding mode, when using the Quinoa extension, it also starts the Node live coding server (npm start) and proxy relevant requests to it (the opposite of setupProxy in RCA).

Currently, it's not possible to disable historyApiFallback on the dev server (react-scripts start). Because of this the dev server is not honoring 404 when a file is not found making it complex to detect if a file is actually served by the NodeJs server or if it's just a fallback.

The Quinoa extension also allow historyApiFallback as part of its routing so having it on the NodeJs server is not necessary.

Describe the solution you'd like

Have an environment variable to disable historyApiFallback. e.g. HISTORY_API_FALLBACK=false react-scripts start

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions