remotion-dev/remotion






The issue has been solved
Load new env variables if `.env` has changed #1363
JonnyBurger posted onGitHub
š This issue is part of our Hacktoberfest campaign! š Read more about Hacktoberfest here š This issue is currently assigned to @Slashgear and not for taking
Acceptance criteria
- If the environment variables changed while
npx remotion preview command
is running, inject them into the browser and reload the server - Use a file watcher if
.env
only if the file exists. - Only inject variables that start with
REMOTION_
(usegetProcessEnv()
to filter out acceptable) - Use the
EventSource
logic (searchnew-input-props
in the codebase) to push a notification to the client that the environment variables have changed and apply a full reload - Figure out how to update the environment variables via Webpack. Maybe it is not possible, in that case you have to write some code that updates the variables on page load.