在我的 Razor 页面之一的脚本部分中有以下内容
@Scripts.Render("~/bundles/script1")
@Scripts.Render("~/bundles/script2")
@Scripts.Render("~/bundles/script3")
问题是它将渲染 3 个 JavaScript 文件。有没有一种方法可以将它们 bundle 在一个文件中而不更改 BundleConfig 文件?
谢谢
最佳答案
The problem is it will render 3 JavaScript files. Is there any way they can be bundled in one file without changing the BundleConfig file?
不,您必须更改 BundleConfig。
Well, if you want to reuse script1 in another page, how will you do that?
关于javascript - Asp.net MVC 5 将所有脚本 bundle 在一个文件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35872939/