madskristensen / BundlerMinifier

Visual Studio extension
Other
611 stars 171 forks source link

Visual Studio 2022 Support #566

Open scottkuhl opened 3 years ago

scottkuhl commented 3 years ago

Installed product versions

Description

Make the extension available in Visual Studio 2022.

Steps to recreate

  1. Download the extension installer.
  2. Run the installer.

Current behavior

Message that it is already installed to all applicable products appears even though it is not installed in Visual Studio 2022. It is also not listed in Online Extensions in Manage Extensions Visual Studio 2022.

Expected behavior

Installs and works in Visual Studio 2022.

Note: Sorry for the all the extra details. I probably could have stopped with the title on this one.

silentdiverchris commented 3 years ago

There's a definitive statement from the author here https://youtu.be/D3R3TlTPCt8?t=3793 - in short, there's not going to be any development for VS 2022, or any further development at all as far as I can tell.

KoalaBear84 commented 3 years ago

If anyone knows an alternative, purely for the bundling and minifying part, that would be great!

scottkuhl commented 3 years ago

That's a huge blow. We have a lot of projects that rely on it. I wonder if Libman will go the same route. We just stop relying on the MVC bundling and minification because the organization has flagged WebGrease as an issue since it's not maintained anymore and MVC relies on it. We switched to these tools instead.

I'm seeing comments from a lot of authors that may not be updating their extensions. We could be seeing the start of a major problem with VS 2022.

silentdiverchris commented 3 years ago

Yesterday I spent the afternoon setting up and experimenting with parcel-bundler v2, my initial fairly urgent need is to just get something to do what BundlerMinifier used to, even if just in the short-term so I can make a simple layout change (and the next simple layout change) without handcrafting 4 .min.css files or doing a laborious manual build of dozens of little _xxxxx.scss files imported in differing combinations into 4 main .min.css files, which BundlerMinifier did so well.

After that, looking for something more long-term that will still work with VS 2022.

I've tried extracting the /www/css structure and playing with parcelling it but while parcel is doing the job with small pieces of the real main.scss files, I am running into problems with it resolving paths. I'm not letting parcel get at the live files yet, which causes some problems with relative paths which I've resolved by extracting a wider set of the live files but some paths are slash-prefixed absolutes, and yep, that could change but I'd rather not alter the scss at all, this is a working system that I don't want to start making unwork.

I have raised a Stack Overflow issue here about not resolving paths, there doesn't seem to be any kind of --dontresolvepaths option at present.

It's not ideal, I'd rather not add hundreds of little .js dependencies to my build process, even if part of a respectable set of libraries so am still looking elsewhere.

If I get something working I'll post again here.

I wonder if Mads can be persuaded just to fix the extension as-is or at least add some diagnostics, does anyone know him to give him a nudge ? :)

madskristensen commented 2 years ago

/cc @timheuer @sayedihashimi

eat-sleep-code commented 2 years ago

Is anyone planning on picking up this repo since @madskristensen has indicated he does not wish to maintain anymore.

What are the well-supported options for generating pre-compiled CSS/JS bundles in VS Code without a separate task runner? WebPack? Anything else?

Their LigerShark project is NOT an option as it appears to be runtime generated only, which is not nearly as fast and causes issues when you need to distribute files across a CDN.

timheuer commented 2 years ago

@eat-sleep-code -- we'd love to start seeing more up-voting of this need in the Visual Studio Developer Community to help prioritize the productization of things like this. @sayedhashimi I think we have some DevComm items here, but if not, maybe we should go ahead and create them at least and encourage upvoting/commentary there to help our planning.

KoalaBear84 commented 2 years ago

As I've heard the main reason of not supporting this for VS2022 was because of the tool windows. Does this mean 'context menus', or really the small 'tool windows'? What especially is the hard part, or why?

Curious because there is nothing written on the support page: https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022 https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/breaking-api-list?view=vs-2022

For me personally it's just about the bare minimum is what we use, purely the bundling and minifying based on the bundleconfig.json.

silentdiverchris commented 2 years ago

If I get something working I'll post again here.

Just to follow this up, albeit with a dead-end, I managed to get BundlerMinifer working again so abandoned my investigations into Parcel-Bundler, but I still need to find a solution for VS2022 and beyond.

scottkuhl commented 2 years ago

@eat-sleep-code -- we'd love to start seeing more up-voting of this need in the Visual Studio Developer Community to help prioritize the productization of things like this. @Sayedhashimi I think we have some DevComm items here, but if not, maybe we should go ahead and create them at least and encourage upvoting/commentary there to help our planning.

Bundler & Minifier, Microsoft Library Manager, and Web Compiler are so critical to the web development experience I was always surprised it was not baked into Visual Studio. I guess now we are seeing the reliance on Mads' extensions and it should be picked up by the Visual Studio team. These should also be included in Visual Studio for Mac.

timheuer commented 2 years ago

@scottkuhl libman is in the product, are you referring to something different? +1 on the others...

scottkuhl commented 2 years ago

@timheuer No, sorry. Microsoft Library Manager showed up as an extension in older versions, I did not realize it was included in 2022 already.

xrkolovos commented 2 years ago

There's a definitive statement from the author here https://youtu.be/D3R3TlTPCt8?t=3793 - in short, there's not going to be any development for VS 2022, or any further development at all as far as I can tell.

Big issue this announcement. Why Visual Studio doesn't embed this features? PLz @madskristensen give us a bit more information about this decision.

rwasef1830 commented 2 years ago

I am maintaining a simplified fork of this library and have set it to make releases automatically with Nuglify nuget releases.

https://github.com/rwasef1830/BundlerMinifier

I removed the visual studio extension part and made it a dotnet tool only.

MaximPak commented 2 years ago

My org relied on this. Well, seems like we'll have to find an alternative solution and update the way we deal with minification of JS.

LaughingJohn commented 2 years ago

TBH I've never really understood why this isn't built into Visual Studio's standard tooling. It seems like a very common requirement.

failwyn commented 2 years ago

Hey all, I upgraded Bundler & Minifier and WebCompiler to work in Visual Studio 2022

https://github.com/failwyn/BundlerMinifier https://github.com/failwyn/WebCompiler

https://marketplace.visualstudio.com/items?itemName=Failwyn.BundlerMinifier64 https://marketplace.visualstudio.com/items?itemName=Failwyn.WebCompiler64

@madskristensen If I missed changing anything in the Licenses, vsixmanifest, or AssemblyInfo just let me know and I'll take care of it; thanks again for everything you contribute to the community!

Hope it works for everyone!

madskristensen commented 2 years ago

@failwyn thank you so much for this. You are a true open source hero!!

gpshonik commented 2 years ago

Thank you @failwyn for upgrading these tools! @madskristensen Did you have any technical issues or concerns that you can share (besides the obvious time commitment required) that made you not want to continue to develop/support these extensions in VS 2022?

madskristensen commented 2 years ago

@gpshonik no technical concerns or issues wen't into the decisions. I made the decision not to continue these projects for a few reasons:

mirshahreza commented 2 years ago

@madskristensen I think you're right. It is better to migrate from these tools.

Firegarden commented 2 years ago

Migrate to what? I have spent many hours going through google looking for the best bundle and minify options for a new asp.net core 5.0 project and it's really depressing. There are no clear answers. Does anyone have an alternative? The official docs say use ligershark web optimizer but even that seems a little out of date.

mirshahreza commented 2 years ago

Yes, I test and review the ligershark web optimizer but it does not suitable :(

failwyn commented 2 years ago

@Firegarden @mirshahreza

If you're still interested in this extension, I forked and upgraded it with Mads' permission, see my comment above for links and details.

Firegarden commented 2 years ago

Hey this is great thank you! I will try it out.

mirshahreza commented 2 years ago

Great, I am going to try

mirshahreza commented 2 years ago

@failwyn Is there a compiled version?

failwyn commented 2 years ago

@failwyn Is there a compiled version?

If you search for Jason Moore in Visual Studio in the Extension Gallery, both extensions will come up; there’s also links to the Visual Studio Marketplace a few posts up if you want to download the vsix file.

mirshahreza commented 2 years ago

Thank u @failwyn

davidthegray commented 2 years ago

@failwyn Is there a compiled version?

If you search for Jason Moore in Visual Studio in the Extension Gallery, both extensions will come up; there’s also links to the Visual Studio Marketplace a few posts up if you want to download the vsix file.

@failwyn, did you also fix the issues with the latest ES updates? Constructs such as for..of, ?? and others didn't work with Mad's extension.

failwyn commented 2 years ago

@failwyn Is there a compiled version?

If you search for Jason Moore in Visual Studio in the Extension Gallery, both extensions will come up; there’s also links to the Visual Studio Marketplace a few posts up if you want to download the vsix file.

@failwyn, did you also fix the issues with the latest ES updates? Constructs such as for..of, ?? and others didn't work with Mad's extension.

It may have been fixed by updating the libraries, but I haven’t tested; if it doesn’t work, add a bug to my repo and I’ll look into it.

hn1 commented 2 years ago

Hi Unfortunatkely, this does not work properly. Sometimes it minfies, sometimes it does not, never bundles so quite a few issues.

failwyn commented 2 years ago

@hn1 Can you please add an issue in the 2022 Repo? A link to a project where I can reproduce your issue would help in identifying the issue.

https://github.com/failwyn/BundlerMinifier/issues

lyellick commented 2 years ago

@failwyn thanks for the work. working well in my environment

irahsu commented 2 years ago

@gpshonik no technical concerns or issues wen't into the decisions. I made the decision not to continue these projects for a few reasons:

* I'm not using these tools myself anymore

* I wrote [LigerShark Web Optimizer](https://github.com/ligershark/WebOptimizer) long ago which is a far better solution IMHO

I looked into ligershark/WebOptimizer and it does look more configurable, BUT I am (and I think others are also) looking for a standalone compiler, instead of something that adds itself to the ASP.NET pipeline and waits for a browser request to generate optimized files on the fly. What about serving files from a third-party CDN (content delivery network)? We web developers don't always get to choose or have control of what web server to serve assets from...

* Something as important as compiling and bundling/minifying need better official support in VS - these extensions kept that from happening

This I 100% agree with! Why, Microsoft, do you leave something so basic out of Visual Studio??

Thanks.