Re-generate missing asset files when building the library info for an asset

Created on 12 October 2023, 9 months ago
Updated 16 October 2023, 9 months ago

Problem/Motivation

If for some reason, the css/js files for an asset get deleted in the public files folder, the only way to restore them is currently re-saving the asset. Let's allow re-building of missing files on cache clear.

Steps to reproduce

  • Create an asset with some CSS definitions
  • Create an override and attach the created asset to it
  • Delete the component_library_assets folder inside the public files folder

The CSS of the asset is no longer applied and the request to the asset ends up in a 404.

Proposed resolution

Add code to re-generate the asset files in component_library_library_info_build() to allow re-generating missing files on cache clear.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024