Skip to content
GitHub

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:

  1. restarts the Vite dev server, which writes a fresh libraries.yml,
  2. runs the cache clear command, drush cr by default, so Drupal picks up the new libraries and templates.

Files starting with an underscore are ignored.

Configuration

vite.config.ts
uebertool({
  features: {
    // Any command, split on spaces. `false` disables it.
    clearCache: 'ddev drush cr',
  },
})