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(ssr: args.include?("--ssr"))
  if args.delete("--force") || last_build.stale? || config.manifest_paths.empty?
    stdout, stderr, status = build_with_vite(*args)
    log_build_result(stdout, stderr, status)
    record_build_metadata(last_build, errors: stderr, success: status.success?)
    status.success?
  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