class ViteRuby::Builder

def build(*args)

and triggers a Vite build if any files have changed.
Public: Checks if the watched files have changed since the last compilation,
def build(*args)
  last_build = last_build_metadata
  if args.delete('--force') || last_build.stale?
    build_with_vite(*args).tap { |success| record_build_metadata(success, last_build) }
  elsif last_build.success
    logger.debug "Skipping vite build. Watched files have not changed since the last build at #{ last_build.timestamp }"
    true
  else
    logger.error "Skipping vite build. Watched files have not changed since the build failed at #{ last_build.timestamp } ❌"
    false
  end
end