Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Bundling and minification with CMS 12 (.NET 6)

Vote:
0

We are working on an upgrade from .NET 4.6.1, CMS 11, and Commerce 13 to .NET 6, CMS 12, and Commerce 14.

We are currently using the built-in bundling functionality in .NET Framework (in System.Web.Optimization) as well as Web Compiler, and Bundler & Minifier (by Mads Kristensen). 
What is everyone using to accomplish bundling and minification going forward onto .NET 6 given that there is no longer any native support for bundling and Mads Kristensen has stated that he would no longer be supporting the Web Compiler and Bundler & Minifier?

Microsoft throws out WebOptimizer by Mads Kristensen as a replacement but I have been seeing issues reported suggesting that it doesn't actually work with .NET 6.

I opened a ticket with support to ask their opinion but I wanted to see what the hive-mind thought as well.

#292510
Nov 30, 2022 23:10
Vote:
0

Hi 

Have you encountered the issue? From what I can see the issue has been fixed (see 1st link below). 

FIX ASP.NET Core 6 default file provider by MeikelLP · Pull Request #219 · ligershark/WebOptimizer (github.com)

#292511
Dec 01, 2022 4:59
Vote:
0

I have not yet tried implementing it. I'm in the information gathering phase now. I was scared off of WebOptimizer by the following issues that have been reported since the PR above was included:
https://github.com/ligershark/WebOptimizer/issues/239

https://github.com/ligershark/WebOptimizer/issues/232

https://github.com/dotnet/AspNetCore.Docs/issues/27645

https://github.com/dotnet/AspNetCore.Docs/issues/20808 (When guardrex talks about it being "fixed", I think he's just talking about one specifc issue and not that the whole thing is "fixed" to work with .NET 6.)

#292522
Dec 01, 2022 14:24
Vote:
2

Hi agibbles

Thanks for the additional info. It sounds you're looking for bundling and minification strategy if I correctly understand this time :) Unfortunately, I think ASP.NET core no longer offer native bundling and minification solution. I don't find any better and active maintained solution than WebOptimizer.

Most of the clients I worked start using client-side tooling e.g. Gulp / Webpack / Vite / Rollup. You have more support tooling and choice than server side. In addition, Client-side bundling and minifying happened before deployment and it provides the advantage of reduced server load. 

IMHO, I would highly recommend considering client-side bundling and minification strategy during the upgrade to CMS 12 and Commerce 14. 

#292567
Dec 02, 2022 1:43
Andreas J - Dec 02, 2022 12:10
Came to say the same thing - use a bundler like Webpack, it's a better solution even though it might imply changing your release pipeline.
Vote:
0

I wanted to add that I heard back from Oprimizely support and they said that they had no recommendation beyond just directing me to Microsoft's documentation.

#292700
Dec 05, 2022 14:28
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.