Skip to content

support PUBLIC_URL during development as well #6135

Closed
@PavelPolyakov

Description

@PavelPolyakov

Is this a bug report?

no

Situation

Imagine I want to have the next product structure:

  1. SPA (created using create-react-app), which is going to be served as /auth
  2. API, which is going to be served as /auth/api/*
  3. gateway, which resolves all the requests to the appropriate microservices

Here is a demo repo I prepared.

Problem

In the current version of CRA the variable PUBLIC_URL is ignored during the development.
The closest answer to the question why? which I found was this:
30ee52c#diff-a7f98c18479be87c9f33e7604dbd1a09L33

which was updated by 30ee52c#diff-dc0c4e7c623b73660da1809fc60cf6baR74 (@Timer)

But this is exactly what prevents people from developing CRA applications while being under the gateway. I think it is quite handy in the "microservices" world.

Question

Are there any solutions to this problem? Is this something we can change in the CRA behaviour?

Regards,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions