3

Here is some css/js/html compressor like:
https://csscompressor.com/
or
https://javascript-compressor.com/

And I heard that node.js using some module can automatically compress css/js.I wonder that if .net core has something the same.

However I searched nuget and found nothing about that.Is there any other way can do it?Thank you.

2 Answers 2

4

Bundling and minification is already supported out-of-the-box by ASP.NET Core. It uses the bundleconfig.json file to configure the process.

You can read more about the process and configuration here:

Microsoft Docs - ASP.NET Core Minification

Is this what you were looking for?

Sign up to request clarification or add additional context in comments.

2 Comments

Yeah!That's what I need.Whereas I think I need more time to learn it.Thank you!
correction, it is not supported by asp.net core, the link say "ASP.NET Core doesn't provide a native bundling and minification solution."
0

I found a easier way to do it by using a middle ware but not the way microsoft showed.

Here is the way: https://www.hanselman.com/blog/WebOptimizerABundlerAndMinifierForASPNETCore.aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.