Skip to content

Building locally with dev env causes bundle to hardcode dev env hostname as api host #111

Description

@LongLiveCHIEF

What happened

The execution of the pnpm run build command in a local development environmet should create a bundle that would be able to be used to validate the results of a -deployment branch.

However, if you have a non-empty value set for NEXT_PUBLIC_KLIPPER_HOSTNAME, then the resulting bundle will hardcode that value as the api host for the return of the getHost function, preventing the bundle from being usable on a deployment host.

In the short term, as a workaround, the build script can prepend NEXT_PUBLIC_KLIPPER_HOSTNAME=''" to the existing command if needed.

What did you expect to happen

bundle should use same execution for hostname discovery as it does in the CI build.

How to reproduce

included above

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions