Class: Jekyll::Vite::ReactRefreshTag

Inherits:
Tag
  • Object
show all
Defined in:
lib/jekyll/vite/tags.rb

Overview

Public: Renders a script tag to enable HMR with React Refresh.

Instance Method Summary collapse

Methods inherited from Tag

#render_variable

Instance Method Details

#render(_context) ⇒ Object



104
105
106
# File 'lib/jekyll/vite/tags.rb', line 104

def render(_context)
  vite_manifest.react_refresh_preamble&.html_safe
end

#syntax_exampleObject



108
109
110
# File 'lib/jekyll/vite/tags.rb', line 108

def syntax_example
  "{% #{ @tag_name } %}"
end