Vukoje
Vukoje

Reputation: 500

ASP.NET Web Optimization - Minification without bundling

Is it possible to use ASP.NET Web Optimization for minification without bundling?

Lets say I have a page Example.cshtml and corresponding javaScript file for that page Example.js. I would like to be able to do something like @Scripts.Render("~/Scripts/Views/Example.js") which will product minified file when not in debug mode. I could of course maintain many single JavaScript file bundles to do this but it seams like unnecessary chore.

Of course there are other solutions for javaScript compression but I think that single approach with run-time compression is the best way to go.

Upvotes: 4

Views: 550

Answers (1)

Hao Kung
Hao Kung

Reputation: 28200

You would have to create a bundle with just one file to accomplish this currently.

Upvotes: 1

Related Questions