what is {version} in ScriptBundle(“~/scripts/jquery-{version}.js”)

旧时模样 提交于 2019-12-06 17:21:42

问题


I try to get started with MVC SPA apps, and I noticed in BundleConfig the following:

 ScriptBundle("~/scripts/jquery-{version}.js")

How this works? What is {version} and where it it taken from?

And where can find more information this, how BundleConfig works and how to customize it?

Thanks


回答1:


See the answers to this question.

Also, check out this link. The Bundling and Optimization section discusses the use of the {version} tag.




回答2:


It allows you to indicate a version number format (semver) that many libraries use. For example, you reference jquery-1.9.1 and then it goes to jquery-1.9.2. Using {version} you don't have to change your code, you just need to re build the bundle.



来源:https://stackoverflow.com/questions/16187333/what-is-version-in-scriptbundle-scripts-jquery-version-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!