require "<%= component.gem_name %>/version"

module <%= gem_module %>
  class Engine < ::Rails::Engine
    # Rails -> use vendor directory.
  end
end

require "<%= component.gem_name %>/version"

if defined?(Rails)
  module <%= gem_module %>
    class Engine < ::Rails::Engine
      # Rails -> use vendor directory.
    end
  end
end


Add check if Rails is defined
Add check if Rails is defined
