Sha256: 44394390e5bfb9fa653f2685549642f180c33b213dc1619a36abce97c12510b5

Contents?: true

Size: 530 Bytes

Versions: 6

Compression:

Stored size: 530 Bytes

Contents

# frozen_string_literal: true

class ViteRuby::CLI::SSR < ViteRuby::CLI::Vite
  DEFAULT_ENV = CURRENT_ENV || 'production'

  desc 'Run the resulting app from building in SSR mode.'
  executable_options

  def call(mode:, inspect: false, trace_deprecation: false)
    ViteRuby.env['VITE_RUBY_MODE'] = mode
    cmd = [
      'node',
      ('--inspect-brk' if inspect),
      ('--trace-deprecation' if trace_deprecation),
      ViteRuby.config.ssr_output_dir.join('ssr.js'),
    ]
    Kernel.exec(*cmd.compact.map(&:to_s))
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vite_ruby-3.1.7 lib/vite_ruby/cli/ssr.rb
vite_ruby-3.1.6 lib/vite_ruby/cli/ssr.rb
vite_ruby-3.1.5 lib/vite_ruby/cli/ssr.rb
vite_ruby-3.1.4 lib/vite_ruby/cli/ssr.rb
vite_ruby-3.1.3 lib/vite_ruby/cli/ssr.rb
vite_ruby-3.1.2 lib/vite_ruby/cli/ssr.rb