问题
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