Answer the question
In order to leave comments, you need to log in
How to add custom version to JS and CSS file path in Yii2?
In a Yii2 project, you need to integrate a pseudo version of CSS and JS into the download URL. In the example below, v-1.2 is an auto-populated arbitrary value.
<script src="/js/lib/v-1.2/jquery.min.js"></script>
Answer the question
In order to leave comments, you need to log in
if you understand the task correctly, then you can do this:
1. Move the resource files to the appropriate AssetBundle, and connect it in the right places
2. Set the appendTimestamp property to true in the AssetManager.
After these steps, after each publication of resources, the corresponding version will be added
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question