module ViteRuby::CompatibilityCheck
def verify_plugin_version(root)
def verify_plugin_version(root) package = JSON.parse(root.join('package.json').read) rescue {} requirement = package.dig('devDependencies', 'vite-plugin-ruby') || package.dig('dependencies', 'vite-plugin-ruby') raise_unless_satisfied(requirement, ViteRuby::DEFAULT_PLUGIN_VERSION) end