css js bundle
来源:互联网 发布:生物医药上市知乎 编辑:程序博客网 时间:2024/06/16 20:12
------------- Layout.cshtml -------------
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Title</title>
@this.Html.Partial("BundleStylesFile")
@this.RenderSection("Styles", required: false)
</head>
<body>
html code
@this.Html.Partial("BundleScriptsFile")
@this.RenderSection("Scripts", required: false)
<script>
...
</script>
</body>
</html>
------------- BundleStylesFile.cshtml -------------
<environment names="@EnvironmentName.Development">
<link rel="stylesheet" href="~/css/bootstrap/bootstrap.css" asp-append-version="true" />
...
</environment>
<environment names="@EnvironmentName.Staging,@EnvironmentName.Production">
<link rel="stylesheet" href="~/css/bootstrap/bootstrap.min.css" asp-append-version="true" />
...
</environment>
------------- BundleScriptsFile.cshtml -------------
<environment names="@EnvironmentName.Development">
<script src="~/js/bootstrap/bootstrap.js" asp-append-version="true"></script>
...
</environment>
<environment names="@EnvironmentName.Staging,@EnvironmentName.Production">
<script src="~/js/bootstrap/bootstrap.min.js" asp-append-version="true"></script>
...
</environment>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Title</title>
@this.Html.Partial("BundleStylesFile")
@this.RenderSection("Styles", required: false)
</head>
<body>
html code
@this.Html.Partial("BundleScriptsFile")
@this.RenderSection("Scripts", required: false)
<script>
...
</script>
</body>
</html>
------------- BundleStylesFile.cshtml -------------
<environment names="@EnvironmentName.Development">
<link rel="stylesheet" href="~/css/bootstrap/bootstrap.css" asp-append-version="true" />
...
</environment>
<environment names="@EnvironmentName.Staging,@EnvironmentName.Production">
<link rel="stylesheet" href="~/css/bootstrap/bootstrap.min.css" asp-append-version="true" />
...
</environment>
------------- BundleScriptsFile.cshtml -------------
<environment names="@EnvironmentName.Development">
<script src="~/js/bootstrap/bootstrap.js" asp-append-version="true"></script>
...
</environment>
<environment names="@EnvironmentName.Staging,@EnvironmentName.Production">
<script src="~/js/bootstrap/bootstrap.min.js" asp-append-version="true"></script>
...
</environment>
阅读全文
0 0
- css js bundle
- 在ASP.NET MVC中,使用Bundle来打包压缩js和css
- Unable to download JS bundle 解决方案
- react-native:unable to download js bundle
- Bundle
- Bundle
- Bundle
- Bundle
- BUNDLE
- bundle
- bundle
- Bundle
- Bundle
- bundle
- Bundle
- bundle
- Bundle
- Bundle
- GDB 调试
- 四种修饰符
- Unity3D开发之XML解析
- Java数据类型整理
- 人工智能微信讨论群
- css js bundle
- tomcat如何访问非webapp下的资源文件
- mysql 查看当前使用的配置文件my.cnf
- angular JS 三种服务
- OkHttp3-Android网络请求框架常用用法介绍与实例(mob请求天气预报),还好!
- java通过反射获取枚举对象
- 二级列表的实现
- googleservice学习
- 设计模式博客地址