Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundling and minification broken #3023

Closed
Eilon opened this issue Apr 4, 2018 · 30 comments
Closed

Bundling and minification broken #3023

Eilon opened this issue Apr 4, 2018 · 30 comments

Comments

@Eilon
Copy link
Member

Eilon commented Apr 4, 2018

From @ipjohnson on April 4, 2018 11:54

I know that bundling and minification were removed from MVC proper but the replacement documented by ms here is broken with bootstrap 4 and has been for a year+ with no fix in sight.

I understand the desire to lean on open source to not have to reinvent the wheel but this seems like a huge feature gap and one that is very painful. At some point developers want to be productive and not have to find new solutions to problems that had been solved.

@davidfowl , @Eilon any thoughts?

Copied from original issue: aspnet/Mvc#7596

@Eilon
Copy link
Member Author

Eilon commented Apr 4, 2018

@DamianEdwards - do we have a pointer to the official story on bundling/minification?

@DamianEdwards
Copy link
Member

Beyond that, we do intend to revisit this in a future version

@ipjohnson
Copy link

Guys Help me out here if I get something wrong with my summary of the situation.

In MVC 5 we had a very full featured bundling & minification feature set documented here that was supported by Microsoft.

Fast forward to asp.net core the feature has been removed in favor of depending on a 3rd party "community driven" project written by a Microsoft employee. That project has issues that have been known for a year plus but the maintainers of said project can't be reached for support.

Microsoft has documented this 3rd party solution as the way to do bundling/minification in asp.net core but has absolved themselves of any responsibility for it working by sprinkling this through the documentation. "The Bundler & Minifier extension belongs to a community-driven project on GitHub for which Microsoft provides no support. Issues should be filed here."

In the end the developer is left in the situation of having to use a tool that isn't supported and has issues or go the full blown route of learning and using gulp.

I'm usually an asp.net core cheerleader but this seems like a major step back from what we used to have.

@DamianEdwards
Copy link
Member

Your summary is completely accurate. This is an acknowledged feature gap from what we had in MVC 5 and is an unfortunate result of the initial decision to attempt to follow the industry trend in this space (namely using node-based build tools). We do intend to fill this gap in a future release with functionality similar to what was there in MVC 5, plus build-time and publish-time support.

I apologise for the state we're in right now and can only reiterate that we intend to address this in an upcoming release.

@ipjohnson
Copy link

@DamianEdwards thank you for your quick and honest responses to my comments. I also thank you for giving us some guidance on what we should do moving forward. I think the answer is for the moment implement what you need to using gulp (node) and wait for a future release to address this gap.

@rockstardev
Copy link

Hey thread - I've fixed bug that impacted Bootstrap4: trullock/NUglify#46

If you can reach @madskristensen and get him to publish NuGet that incorporates my PR NUglify merged - it'll all be well in coding wonderland.

You up for it @DamianEdwards?

@DamianEdwards
Copy link
Member

@lepipele I reached out to him on twitter. Will reach out on internal email if that doesn't work. Last resort, I'll find his new office and walk over there 😸

@rockstardev
Copy link

Sweet ;) I've created PR to make it even easier: madskristensen/BundlerMinifier#348

@madskristensen
Copy link
Contributor

I've taken the PR (thanks!!) and a new build of the VS extension is available for testing here http://vsixgallery.com/extension/a0ae318b-4f07-4f71-93cb-f21d3f03c6d3/

Please give it a try before I publish it to the Marketplace and update the NuGet packages

@rockstardev
Copy link

He lives!

@madskristensen I've used NuGet to add it to our project since it's easier to maintain between developer machines.

If I compile DLL and test using that - it should be the same as testing extension, correct? What happens if I have both NuGet and extension installed?

@madskristensen
Copy link
Contributor

@lepipele yes, that should be the same. They don't conflict but if they are not using the same version then they output might differ

@rockstardev
Copy link

@madskristensen just gave it a try... works splendidly. If you have both NuGet and Visual Studio Extension, it seems NuGet gets precedence:

animation

So I would say it's ready for NuGet push.

If you (or @DamianEdwards, @Eilon) have more impactful bugs like this - something that bothers lots of devs ping me - I can take a look and hopefully submit PR to make life easier for other .NET developers... love that you are moving more and more toward open source so outside people can help.

@ipjohnson
Copy link

This is a great fix, tip of the cap to all in involved. @DamianEdwards with this issue closing out is there another issue to track the feature gap for bundling and minifications?

@mm98
Copy link

mm98 commented Apr 6, 2018

I can also confirm, that this is working!

@rockstardev
Copy link

rockstardev commented Apr 7, 2018

@ipjohnson you can join us on Issues page for Bundling&Minification. For this particular bug I found like 3 issues opened:

madskristensen/BundlerMinifier#306
madskristensen/BundlerMinifier#218
madskristensen/BundlerMinifier#346

I think the fact there are lots of issues opened just shows how vital this extension is... and how much people are using it. Plus there are few extra features that would take it to the next level... for example this guy coded great helper for creating Bundle references in Razor:

https://github.com/meziantou/Meziantou.AspNetCore.BundleTagHelpers

It would be great if @madskristensen can add someone else as Contributor, if nothing else, then to sort out open issues. I would openly campaign for myself... but I can't guarantee dedication considering my main job obligations and then extra work I'm doing with Nicolas on BtcPayServer, the best Bitcoin / crypto open source payment processor ever devised /plug

However, if there are features you like to see... let me know... if it makes sense we can devise some roadmap, get @madskristensen to sign off on changes (promising he'll merge and publish once tests past). From there it would be open source effort to make it happen... we can all code and make it happen together.

@ipjohnson
Copy link

@lepipele I agree the topic of bundling & minification is very important. So much so that it feels like it should be part of the features microsoft provides and supports (it's a web stack with no in house answer for bundling/minification).

Hence why I'm very interested in @DamianEdwards efforts moving forward to tackle this feature gap from what we had in previous version before asp.net core.

It's good to have options like gulp and this plugin but it's also very important for MS to have something that works out of the box that they support.

@madskristensen
Copy link
Contributor

@lepipele I'd be happy to add contributors to the project, but so far no one has asked. Would you be interested?

@rockstardev
Copy link

@madskristensen sure, as long as you are commited to syncing up every now and then to ensure shared vision. Like, I can distill issues from tracker into roadmap, you sign-off... and then when new version is ready you can test + push new packages.

If you are OK with that - add me as Contributor and I'll shoot you email with first roadmap later this week. Also, you can ping me if you already have ideas/features/roadmap.

@madskristensen
Copy link
Contributor

@lepipele I just added you as a contributor. Yes, I can commit to that.

@rockstardev
Copy link

@madskristensen great! Before emailing you I'll also see if I can get hold of @xoofx and have him join us in some capacity. It seems that lots of stuff people complain on Bundle&Minifier should be first addressed in NUgilfy: https://github.com/xoofx/NUglify/

@rockstardev
Copy link

Hey @madskristensen - I've emailed you few days ago - you got the message? Or it went to spam?

@madskristensen
Copy link
Contributor

@lepipele It was in my spam folder. Reading now...

@tang2087
Copy link

tang2087 commented May 6, 2018

I tried the latest version and this issue still exists:
Processing �[36m�[1mwwwroot/css/site.min.css�[0m�[39m�[49m
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'
Expected semicolon or closing curly-brace, found '-'

@ipjohnson
Copy link

@DamianEdwards Is there any progress on getting an officially supported solution from microsoft? We're nearing 6 months and it looks like issues are piling up for the minification project (ES6 broken, broken minification case, no mapping file etc).

@ghost
Copy link

ghost commented Oct 17, 2018

@Eilon @DamianEdwards @madskristensen @davidfowl @danroth27
Can someone please give us ASP.NET developers an idea when we can expect to have a first class experience in Visual Studio for bundling and minification.

Its a huge feature of the website development story that is missing.

The bundleconfig.json file was removed aspnet/Templating#335 some 8 months ago and to someone outside of Microsoft there is the perception that nothing seems to be happening to resolve this gap.

Has this been added to any roadmap / timeframe, perhaps Visual Studio 2019 and .NET Core 3.0 ?

Even an update 8 months on to say that its hasn't been forgotten and you're resolving some issues / design ideas with adding this feature before you can be publish to any roadmap would placate some developers including myself.

@poke
Copy link
Contributor

poke commented Oct 17, 2018

@adrian109 The content written in the “bundle and minify” topic of the documentation still applies.

It’s just the default bundleconfig.json (which was not working for quite a while) that was removed from the template. But there is nothing wrong with adding one back for your own purposes, to bundle and minify your assets.

@ipjohnson
Copy link

@poke while that is true that the documentation still applies it’s certainly not a step in the right direction if you are looking for a first class experience when using asp.net core.

Having to raise issues up to the Microsoft team just to get the maintainer of the third party product to respond is not a first class experience.

The reality is we had a first class experience when it came to MVC 5 and now we don’t.

So a response from Microsoft on this issue would be greatly appreciated. Even if the answer is they are not planning on adding it in 3.0. At least then we’d have some guidance.

@xoofx
Copy link
Member

xoofx commented Oct 18, 2018

Having to raise issues up to the Microsoft team just to get the maintainer of the third party product to respond is not a first class experience.

About NUglify, which is used indirectly by the bundling system, I didn't make it clear in the readme, but I don't consider myself as a real "maintainer" of this project. I just took the responsibility 3 years ago to clone Microsoft Ajax Minifier to save it from codeplex to github. I did a few commits as I was working on some Web development at that time, but I'm no longer using it. So this project can only live by the commitment of the ASP .NET community to fix/contribute back to it. And I will be glad to transfer the full ownership to someone willing to coordinate this effort.

ryanbrandenburg pushed a commit that referenced this issue Nov 27, 2018
…-master

[automated] Merge branch 'release/2.2' => 'master'
@aspnet-hello
Copy link

We periodically close 'discussion' issues that have not been updated in a long period of time.

We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.

@aspnet-hello aspnet-hello removed this from the Discussions milestone Dec 18, 2018
@dotnet dotnet locked and limited conversation to collaborators Dec 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants