Skip to content
This repository was archived by the owner on Jul 19, 2021. It is now read-only.
This repository was archived by the owner on Jul 19, 2021. It is now read-only.

Setting environment variable PUBLIC_URL does not set PUBLIC_URL on build #66

@webbushka

Description

@webbushka

Description

When using the PUBLIC_URL field in .env and then running npm run build the build succeeds but the PUBLIC_URL is not set. Seems that rescripts is ignoring the environmant variable. When setting homepage in package.json PUBLIC_URL is set. This works in a base react-scripts app as well as with react-scripts-rewired. But when moving to rescripts it no longer works.

@rescripts/cli@0.0.11
@rescripts/rescript-env@0.0.11
react-scripts@3.0.1

Expected Behavior

URLs using the PUBLIC_URL variable should be set using the PUBLIC_URL environment variable.

Current Workaround

Add the url to your package.json as 'homepage'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions