Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Playground Block: set style version number (#256)
This PR ensures that the style cache will be busted when a new version is released. ## Why? The style version is currently displayed as _0.0.1_ which matches `block.json`. When a new version of the plugin is released, browsers keep returning the cached version of the style file which might be outdate. ## How? The style file is now manually registered and a version is set to the last modified time of the file. This will ensure that if a new version is installed, browsers will flush the cache. ## Testing Instructions <!-- Please include step by step instructions on how to test this PR. --> 1. Check out the branch. 2. Start a local dev site 3. Open a post edit page and add a playground block 4. In network tools confirm that the style path has a timestamp as a version (e.g. _build/style-index.css?ver=1715165957_)
- Loading branch information