Inject environment variables
See original GitHub issueUse case: I have NEXT_PUBLIC_DEPLOYMENT_URL. In order to read it I have to use manually dotenv
, which is not ideal.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Environment Injector - Jenkins Plugins
Removes inherited environment variables by the Jenkins Java process · Injects environment variables at node (controller/agent) startup · Executes ...
Read more >How to set environment variables in Jenkins? - Stack Overflow
Go to your job Configure screen · Find Add build step in Build section and select Inject environment variables · Set the desired...
Read more >Inject environment variables with the CircleCI API
You can inject environment variables with the build_parameters key to enable your functional tests to build against different targets on each run (for ......
Read more >How to Use Environment Variables the Right Way
Instead of using environment variables (dependencies) directly, we inject them at callsites (that is, the place they are actually used).
Read more >Jenkins Environment Variables: Ultimate Guide - phoenixNAP
Adding the EnvInject plugin to Jenkins allows you to inject environment variables during the build startup. This is particularly useful when ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While I’d agree that injecting environment variables wouldn’t be in scope for a standalone sitemap generator, I don’t agree that it shouldn’t be in scope for this project: given its tight coupling with Next.js.
Next.js injects environment variables. If this was a normal Next.js plugin (i.e. one that made use of webpack / the
next.config.js
file) then the variables would be injected. It’s only due to the mechanism behind this plugin that they aren’t - but to ensure a consistent DX, surely it would be preferable that they are.It’s a 2 line fix with no dependencies other than Next.js itself:
@reubn I totally missed this since you commented on a closed issue. I have added support for .env loading. Consider mentioning my username or reopen the issue next time.
@ilgarm It’s here.