madskristensen / BundlerMinifier

Visual Studio extension
Other
611 stars 171 forks source link

Bundling of bootstrap.js v5.0.1 fails #563

Open mrdnote opened 3 years ago

mrdnote commented 3 years ago

Error: Object reference not set to an instance of an object. BundlerMinifier works with fine bootstrap 4.6.0 tho.

eat-sleep-code commented 3 years ago

Previously reported here: https://github.com/madskristensen/BundlerMinifier/issues/558

It appears this module might no longer be maintained as there are no responses/acknowledgements to recent open issues from @madskristensen

There are several open pull requests, to fix issues that haven't been addressed either.

mrdnote commented 3 years ago

The official microsoft solution for bundling an minifying (at least in .net core and .net 5.x) is now the nuget package WebOptimizer. I replaced BundlerMinifier with it and it works well.

https://www.nuget.org/packages/LigerShark.WebOptimizer.Core/

PS I'm not affiliated to WebOptimizer in any way

eat-sleep-code commented 3 years ago

@mrdnote Do you have any reference to it being the official solution? If so, is it pretty quick to lift and shift to it from BundlerMinifier?

This concerns me from: https://github.com/ligershark/WebOptimizer

Master is being updated for ASP.NET Core 3.0 For ASP.NET Core 2.x, use the 2.0 branch.

Why would it not be .NET 5?

mrdnote commented 3 years ago

Because most .net core 3.0 is compatible under .net (core) 5.0.

https://docs.microsoft.com/en-us/aspnet/core/client-side/bundling-and-minification?view=aspnetcore-5.0

I spent about 2 hours migrating my bundles...

eat-sleep-code commented 3 years ago

Oh sigh, just realized this does runtime bundling / minification instead of static minification like BundlerMinifier. Not a fan of that.

rwasef1830 commented 2 years ago

It's a bug in NUglify that was fixed. You need to build this against an updated NUglify or switch to my fork.

thepra commented 2 years ago

I tried the NuGet package of WebOptimizer on Blazor WebAssembly, let's say it didn't like it at all(dependency wide).

dmitry-pavlov commented 2 years ago

Temporary workaround #558 here in the comment