title: How can I set "--max-old-space-size" when using gradle-node-plugin or force in in node config?
body: <p>I am using <a href="https://github.com/srs/gradle-node-plugin" rel="noreferrer">https://github.com/srs/gradle-node-plugin</a> to launch NPM tasks as part of my build.</p>
  
  <p>But, webpack is now running out of heap space, reporting <code>FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory</code></p>
  
  <p>I can't figure out any way to tell the the NpmTask to pass the <code>--max-old-space-size</code> flag directly to node (placing it anywhere in the NpmTask args property ends up passing the flag as an argument to the npm script, which ignores it or to webpack which fails because it doesn't know the arg).</p>
  
  <p>I found this github issue: <a href="https://github.com/srs/gradle-node-plugin/issues/141" rel="noreferrer">https://github.com/srs/gradle-node-plugin/issues/141</a>, but it only seems to relate to the NodeTask, not NpmTask.  Looking at it, I'm thinking NpmTask needs to be extended with an extra <code>options</code> property like NodeTask now has.</p>
  
  <p>Is there a global config "node.js" way I can force node to use more heap space until I figure out how to get NpmTask to do what I want?</p>