Reputation: 500
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
Reputation: 28200
You would have to create a bundle with just one file to accomplish this currently.
Upvotes: 1