Skip to content

Restart Vite when a page entrypoint is added or removed

What does this MR do and why?

This change restarts Vite server as soon as you add or delete a new page entrypoint in these paths:

  1. app/assets/javascripts/pages/
  2. ee/app/assets/javascripts/pages/
  3. jh/app/assets/javascripts/pages/

How to set up and validate locally

  1. Go to notifications page: https://gdk.test:3443/-/profile/notifications
  2. Add app/assets/javascripts/pages/profiles/index.js with console.log(1)
  3. Wait for Vite to restart
  4. 1 should appear in the console once you refresh the page

Merge request reports