ASP.Net MVC4 BundleConfig에서 min.js 혹은 사용자 지정 css 등이 적용되지 않을 때
BundleConfig class
1
2
3
4
5
6
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/Scripts/jquery")
.Include("~/Scripts/jquery-1.8.0.js")
.Include("~/Scripts/jquery.tmpl.min.js"));
}
html 코드
1
2
3
4
5
<html>
<head>
@Scripts.Render("~/Scripts/jquery")
</head><body>test</body>
</html>
html 랜더링 후
1
2
3
4
5
6
<html>
<head>
<script src="/Scripts/jquery-1.8.0.js"></script>
</head>
<body>test</body>
</html>

이렇게 BundleConfig에서 지정한 local이나 외부 js나 css파일이 렌더링 면서 동작을 안 하는 듯한?? 모습이 보일때가 있더라고요..

이거 debug모드 혹은 localhost에서는..이런 버그가 있답니다…
참고하세요

Author: jklee@lenscloth.io
Link: https://lenscloth-ko.github.io.git/2014/05/29/ASP-Net-MVC4-BundleConfig에서-min-js-혹은-사용자-지정-css-등이-적용되지-않을-때/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.