2

I have a .net core 3 application with blazor. I have a 2 folders of js and css files that I want to bundle and minify. Can someone please suggest a good library for bundling and minification? Preferably part of dotnet otherwise a third party library is fine.

Thank you

1

1 Answer 1

2

I'm using Bundler & Minifier extension with visual studio. you can create multiple bundle file as per your requirement. below is my webiste bundle file

[{
"outputFileName": "wwwroot/css/bundle.min.css",
"inputFiles": [
  "wwwroot/lib/bootstrap/dist/css/bootstrap.min.css",
  "wwwroot/lib/font-awesome/css/font-awesome.min.css",
  "wwwroot/lib/sweetalert2/dist/sweetalert2.min.css",
  "wwwroot/css/style.css"
],
"minify": {
  "enabled": true,
  "renameLocals": true
}
  },
  {
"outputFileName": "wwwroot/js/bundle.min.js",
"inputFiles": [
  "wwwroot/js/location.js",
  "wwwroot/js/login.js",
  "wwwroot/js/ManageClassified.js",
  "wwwroot/js/createClassified.js",
  "wwwroot/js/searchClassifield.js"
],
"minify": {
  "enabled": true,
  "renameLocals": true
}
  }]
Sign up to request clarification or add additional context in comments.

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.