I have some Nunjucks template blocks that I want to render only in certain environments. I can't seem to access the NODE_ENV
variable though. I tried this:
{% if process.env.NODE_ENV === 'development' %}
<div>rendering some stuff here</div>
{% endif %}
This didn't seem to work for me though. It didn't seem to have any idea what process.env.NODE_ENV
was.
Is it possible to access an environment variable like this in a template?