1 新建asp.net core web空应用
2 通过libmen安装bootstrap到wwwroot
3 在wwwroot下面新建css文件夹,并添加一个css文件site.css
body {
font-size:16px;
margin:25px;
}
[
{
"outputFileName": "wwwroot/css/all.min.css",
"inputFiles": [
"wwwroot/lib/bootstrap/dist/css/bootstrap.css",
"wwwroot/css/site.css"
]
},
{
"outputFileName": "wwwroot/css/bootstrap.css",
"inputFiles": [
"wwwroot/lib/bootstrap/dist/css/bootstrap.css"
],
"minify": {
"enabled": true
}
}
]
5 通过nuget安装BuildBundleMinifier库
6 重新编译下项目,可以看到合成的css文件和压缩的bootstrap文件