Restart & cache clear
New entrypoints restart Vite and clear the Drupal cache.
Adding or deleting a file changes the list of entrypoints and therefore the libraries. In dev mode the plugin takes care of it.
What happens
When a .css, .js, .ts or .twig file is added or removed (not when one changes), the plugin waits 500 ms, then:
- restarts the Vite dev server, which writes a fresh
libraries.yml, - runs the cache clear command,
drush crby default, so Drupal picks up the new libraries and templates.
Files starting with an underscore are ignored.
Configuration
uebertool({
features: {
// Any command, split on spaces. `false` disables it.
clearCache: 'ddev drush cr',
},
})