NAME

Mojolicious::Plugin::BarefootJS::DevReload - Dev-only browser auto-reload for BarefootJS apps

SYNOPSIS

# In your Mojolicious::Lite app (development mode)
plugin 'BarefootJS::DevReload';

# Then in your layout template, before </body>:
%== bf_dev_snippet

DESCRIPTION

Companion to barefoot build --watch in @barefootjs/cli. The CLI drops <dist>/.dev/build-id after every successful rebuild that changed output; this plugin watches that file and streams SSE event: reload to subscribed browsers so an editor save triggers an automatic reload.

Disabled automatically when $app->mode eq 'production' (set via MOJO_MODE=production). Pass enabled => 0 to disable explicitly or enabled => 1 to force-enable.