I am migrating a .NET Framework project to .NET 6.
Old bundling logic in .NET framework had the below code:
#if DEBUG
BundleTable.EnableOptimizations = false;
#else
BundleTable.EnableOptimizations = true;
#endif
I believe, the code above disables bundling for DEBUG mode & enables it for RELEASE mode?
In .NET 6, I am using WebOptimizer for bundling.
Is there a similar option or setting in WebOptimizer as well?
So actually, this is not specific to .NET 6. I believe you may use something like this.
Also in documentation there is something like this:
Disabling minification: If you want to disable minification (e.g. in development), the following overload for AddWebOptimizer() can be used:
https://github.com/ligershark/WebOptimizer
Regarding to your code in answer below, it is better to do like this: