Learn how to Visually Build at Scale with Builder.io and Netlify Register now!

Back to Community Built
Replace Logo

Replace

Replace ENV variables in your publish directory.

  • DevTools
Add build plugin

Netlify will deploy whatever you stick in your publish directory. This is great for simple use-cases but for projects that span multiple environments or rely heavily on environment variables, it can be tricky manage those differences without resorting to gnarly sed scripts or other unmentionable approaches.

This build plugin solves that problem by replacing references to environment variables after your project is built. A great example of this plugin's power is dynamically updating your _redirects file based on its deployment context.