Answer the question
In order to leave comments, you need to log in
How to change resources correctly in yii2?
I publish js, css and pictures through Asset, Since the resources are initially inaccessible from the web, they themselves are published in .../web/assets/ But I ran into the following problem. how to overwrite published files? as I understand it, yii does not compare the published file and the current one each time, and when changes are made, they do not occur.
In order for the files to be updated, now I delete the folder with the necessary files from .../web/assets/ , is there an easier way to update resources?
Answer the question
In order to leave comments, you need to log in
You can go the other way and not copy the assets, but put links to them
'components' => [
// ...
'assetManager' => [
'linkAssets' => true,
'appendTimestamp' => true,
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question