Closed shreesharao closed 6 years ago
Added reference to BuildBundlerMinifier dotnet add package BuildBundlerMinifier This adds a pre-build target to bundle and minify the static files
Added bundleconfig.json file to the project root
[
{
"outputFileName": "wwwroot/css/site.min.css",
"inputFiles": [
"wwwroot/css/main.css",
"wwwroot/css/profile/profile.scss"
]
},
{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
"wwwroot/js/site.js"
],
"minify": {
"enabled": true,
"renameLocals": true
},
"sourceMap": false
}
]
Run dotnet build - creats minified file.
Add Bundling and Minification feature to the project.