title: ASP.NET bundling/minification: including dynamically generated Javascript
body: <p>I have a site that dynamically generates Javascript.  The generated code describes type-metadata and some server-side constants so that the clients can easily consume the server's services - so it's very cacheable.</p>
  
  <p>The generated Javascript is served by an ASP.NET MVC controller; so it has a Uri; say <code>~/MyGeneratedJs</code>.</p>
  
  <p>I'd like to include this Javascript in a Javascript bundle with other static Javascript files (e.g. jQuery etc): so just like static files I want it to be referenced separately in debug mode and in minified form bundled with the other files in non-debug mode.</p>
  
  <p>How can I include dynamically generated Javascript in a bundle?</p>