Yii 1 asset manager does not clear cache for files created with webpack

Seems like there’s a problem between the interaction of Yii 1 asset manager and files created by webpack. Asset manager keep pointing to the old file. If I manually edit the bundle.js file and change anything, then it will renew it. Manually deleted tmp files also work.

Force copy does not work:

Yii::app()->assetManager->forceCopy = true;

Anyone else stumbled upon this?

Seems like asset manager checks the access field of the file? That’s the only one that’s not modified by webpack:

Access: 2022-05-26 23:30:21.149099497 +0200
Modify: 2022-05-26 23:33:29.865387673 +0200
Change: 2022-05-26 23:33:29.865387673 +0200

Meeeh, solved by publishing the precise file instead of the folder it’s put into.

1 Like

Using symbolic links may help in that case: CAssetManager | API Documentation for Yii 1.1 | API Documentation for Yii 1.1 | Yii PHP Framework