Open
Description
Issue details
So, I'm using 11ty, which comes bundled with browser-sync by default.
All good so far.
But I'm also using Stimulus, which relies on a specific syntax to set actions: https://stimulus.hotwired.dev/reference/actions
It looks to me like browser-sync is looking for the first >
char, right after <body
to inject the script tag — but I could be wrong. And as you can see, when using Stimilus and using the <body>
element as a Stimulus controller, it can cause some issues.
Steps to reproduce/test case
- Set up a simple 11ty website
- Add an attribute to the body tag such as
data-action="access:notify->notification#show"
— I believe you can avoid setting up Stimulus altogether - Witness the body tag get messed up as follows:
Source:Result:<body class="home" data-controller="application" data-action="access:notify->notification#show">
Please specify which version of Browsersync, node and npm you're running
- Browsersync v2.27.11
- Node v18.12.0
- Npm v8.19.2
Affected platforms
- linux
- windows
- OS X
- freebsd
- solaris
- other (please specify which)
Browsersync use-case
- API — I suppose, it's the default 11ty integration
- Gulp
- Grunt
- CLI
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
{Browsersync init code here}