Having multiple inquiries regarding my ASP.NET MVC CORE 2.2 project. The primary objective is quite straightforward - updating the stylesheet and deploying the changes. I am in possession of Site.less, site.css, site.min.css, site.min.css.gz files that need to be updated with a new css class style. Additionally, there's a bundleconfig.json containing input css and javascript files for bundling, as well as a compilerconfig.json specifying Site.less as input and site.css as output. BuildBundlerMinifier package has also been installed via NuGet.
Queries:
1- When adding a new style, should I update Site.less, site.css or both? 2- What are the steps involved in minifying and bundling before publishing my app?
bundleconfig.json:
[
{
"outputFileName": "wwwroot/css/bundle.min.css",
// Array of relative input file paths supporting globbing patterns
"inputFiles": [
(...)
"wwwroot/css/Site.min.css"
]
},
(...)
// Minification options can be specified
"minify": {
"enabled": true,
"renameLocals": true
},
// Option to generate .map file
"sourceMap": false
}
]
compilerconfig.json
[
{
"inputFile": "wwwroot/css/Site.less",
"outputFile": "wwwroot/css/site.css"
}
]
Upon rebuilding the project, these messages appear in the Output window of Visual Studio 2017:
Cleaning output from bundleconfig.json, Done cleaning output file from bundleconfig.json, Begin processing bundleconfig.json, Minified wwwroot/css/bundle.min.css, Done processing bundleconfig.json
Your assistance in this matter is much appreciated.