Home > Mobile >  bundleconfig.json configured, but bundles not being created in ASP.NET Core 3.1
bundleconfig.json configured, but bundles not being created in ASP.NET Core 3.1

Time:09-18

Using the Bundle and minify static assets in ASP.NET Core page as a guide, I've created a bundleconfig.json in my project root and set it up to create the css and script bundles I want to create. The page seems to imply that while 3rd party tools like Gulp or Grunt can be used, they are not required for basic purposes and I should be able to "Build the application" and then find the bundled .min files created, but they are not there after I build. I tried simplifying my config to just bundle two CSS files together but it still doesn't create the output file. Here are my bundleconfig.json contents:

[
    {
        "outputFileName": "wwwroot/css/tlgsso.min.css",
        "inputFiles": [
            "wwwroot/css/application.css",
            "wwwroot/css/site.css"
        ]
    }
]

I have been assuming this is meant to work simply by having a file named "bundleconfig.json" in the root. As has frequently been the case, all I can find is information on ASP.NET Core 1-2.0. Am I missing something needed to trigger the bundling & minification?

CodePudding user response:

I needed to install the BundlerMinifier.Core NuGet package. Then it worked.

  • Related