Open sshahar1 opened 8 years ago
:+1: i need this!
This is not working for me. gulp doesn't pick up the environment variables.
Working for webpack. I'm keeping this open for @sonirahul
@sonirahul for me is working, but i'm invoking gulp using npm script from package.json
@adumat can you please tell me how are you passing environment variables like NODE_ENV?
@MatellioRahul with this definition on pom:
<execution>
<id>build</id>
<phase>generate-resources</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
<environmentVariables>
<NODE_ENV>${NODE_ENV}</NODE_ENV>
</environmentVariables>
</configuration>
</execution>
where NODE_ENV is a properties defined in pom properites section and overwritten by profiles of maven.
I'm using the plugin to build angularJS code, with npm and webpack. It works fine, but I need to set NODE_ENV, so some variables would be read from environments.json
I can't figure out if it is possible and how, so I am hoping for your help.
Thanks in advance Sigal