lib/vite_ruby/builder.rb in vite_ruby-3.2.5 vs lib/vite_ruby/builder.rb in vite_ruby-3.2.6
- old
+ new
@@ -11,10 +11,10 @@
# Public: Checks if the watched files have changed since the last compilation,
# and triggers a Vite build if any files have changed.
def build(*args)
last_build = last_build_metadata(ssr: args.include?('--ssr'))
- if args.delete('--force') || last_build.stale?
+ if args.delete('--force') || last_build.stale? || config.manifest_paths.empty?
stdout, stderr, success = build_with_vite(*args)
log_build_result(stdout, stderr, success)
record_build_metadata(last_build, errors: stderr, success: success)
success
elsif last_build.success