Webapp config injection outside of next.config.js not supported #900

Closed
opened 2024-07-30 19:05:34 +00:00 by dboreham · 2 comments
Owner

Next js supports two methods for config variable injection:

  1. Name variable NEXT_PUBLIC_XXX then refer to it as process.env.NEXT_PUBLIC_XXX anywhere in app code.
  2. Use any name for the variable (YYY) then add it to the env element in next.config.js then refer to it as process.env.YYY anywhere in app code.

The webapp deployer currently only supports the second (newer) approach.

Add support for the first approach because some apps are still using the older approach.

Next js supports two methods for config variable injection: 1. Name variable NEXT_PUBLIC_XXX then refer to it as `process.env.NEXT_PUBLIC_XXX` anywhere in app code. 1. Use any name for the variable (YYY) then add it to the `env` element in next.config.js then refer to it as `process.env.YYY` anywhere in app code. The webapp deployer currently only supports the second (newer) approach. Add support for the first approach because some apps are still using the older approach.
telackey was assigned by dboreham 2024-07-30 19:05:34 +00:00
Author
Owner

Actually the bug is that no env element in the config object leads to no injection happening.

Actually the bug is that no `env` element in the config object leads to no injection happening.
Member

Fixed by #901

Fixed by https://git.vdb.to/cerc-io/stack-orchestrator/pulls/901
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#900
No description provided.