title: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory - rails webpacker
body: <p>I did some research to fix the JS heap size issue - the answer is to set the max_old_space_size</p>
  
  <p>Eg: <a href="https://stackoverflow.com/questions/26094420/fatal-error-call-and-retry-last-allocation-failed-process-out-of-memory">FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory</a>
  However, <code>./bin/webpack-dev-server --max_old_space_size=4096</code> is not an option</p>
  
  <p>Anyone else ran into the same issue? How did you fix it?</p>
  
  <p>My package.json does not have scripts as suggested in some other posts.</p>
  
  <p>Our setup is somewhat similar to this - <a href="https://github.com/rails/webpacker/blob/master/docs/webpack.md" rel="nofollow noreferrer">https://github.com/rails/webpacker/blob/master/docs/webpack.md</a></p>