title: Can I force Webpack to evaluate and inline a module?
body: <p>I have a JavaScript module:</p>
  
  <pre class="lang-js prettyprint-override"><code>// lib/something-expensive.js
  module.exports = theResultOfAnExpensiveCalculation()
  </code></pre>
  
  <p>I'm going to be running this code in a serverless environment, so if every invocation that calls <code>require('lib/something-expensive')</code> ends up calling <code>theResultOfAnExpensiveCalculation()</code> I'm going to add unnecessary latency and increase my server bill.</p>
  
  <p>Is there a way to tell Webpack to evaluate <code>theResultOfAnExpensiveCalculation()</code> and compile the module to</p>
  
  <pre class="lang-js prettyprint-override"><code>// lib/something-expensive.js
  module.exports = "the result of the expensive calculation"
  </code></pre>