When files inside the published directory for an AssetBundle changes, Craft doesn't re-publish the package to /web/cpresources.
plugin/src/MyAwesomeBundle.php)plugin/src/resources/js/file.js)@ns/plugin/resources) and the JS file (js/file.js) in the AssetBundle classresources directory is published to web/cpresourcesplugin/src/resources/js/file.jsresources directory has not been re-publishedNote: This is running locally using Laravel Valet 2.0.3. The web directory is symlinked to public, which might be relevant.
Note 2: Deleting the published folder manually _does_ make Craft re-publish the bundle.
This should be fixed now.
For the curious / future-me: Yii only re-publishes asset bundles when the root directory’s modification time changes (https://github.com/yiisoft/yii2/issues/8197). We had extended that in Craft to also check any sub-directories’ modification times, however we’re finding that there are cases when a directory’s modification time does not get updated even if one of its sub-files gets updated. So this latest fix is to check all sub-files in addition to sub-directories to get the latest modification time.
Most helpful comment
This should be fixed now.
For the curious / future-me: Yii only re-publishes asset bundles when the root directory’s modification time changes (https://github.com/yiisoft/yii2/issues/8197). We had extended that in Craft to also check any sub-directories’ modification times, however we’re finding that there are cases when a directory’s modification time does not get updated even if one of its sub-files gets updated. So this latest fix is to check all sub-files in addition to sub-directories to get the latest modification time.