-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Disable Browsersync code injection with simple config option #1882
Closed
6 of 10 tasks
Comments
@alesandroortiz this will end up being: browser-sync . --no-snippet or in your case, you'll be able to do this eleventyConfig.setBrowserSyncConfig({
snippet: false,
}); |
shakyShane
added a commit
that referenced
this issue
Jun 24, 2021
@alesandroortiz please try |
This was referenced Jun 24, 2021
@shakyShane 🎉 Thanks for the quick implementation! Really appreciate it. You have no idea how great this is for some of my projects. 😄 |
This was referenced Jun 24, 2021
Closed
This was referenced Oct 20, 2021
Closed
1 task
This was referenced Nov 29, 2021
18 tasks
1 task
1 task
This was referenced Feb 24, 2022
1 task
1 task
This was referenced Oct 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue details
Feature request: Have a simple configuration option to disable all code injection when Browsersync's web server is used.
I use
eleventy --serve
often under the following scenarios, which uses Browsersync to serve rendered files:The current way to disable all code injection is via
snippetOptions
, per https://twitter.com/eleven_ty/status/1402360471634731009:Another way which still injects code but otherwise disables Browsersync functionality is via
codeSync
and other options (this is what I currently use for the second scenario):It would be nice to have a simpler way to disable code injection, like a Boolean config option as suggested in the Tweet below.
Twitter thread for further context: https://twitter.com/AlesandroOrtizR/status/1402361877271875590
Steps to reproduce/test case
.eleventy.js
config file:eleventy --serve
Expected: No Browsersync code injection since all functionality is disabled.
Observed: Browsersync still injects code.
Ideally there's an even simpler and more self-documenting config like
injectSnippet: false
or something similar which could be passed to Browsersync via Eleventy.Please specify which version of Browsersync, node and npm you're running
Affected platforms
Presumably affects all platforms, but I'm using Windows.
Browsersync use-case
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
Used via
eleventy --serve
which calls this logic:https://github.com/11ty/eleventy/blob/e94b8be9116c5228261c910b9b07361338096722/src/EleventyServe.js#L139
Relevant Eleventy docs: https://www.11ty.dev/docs/usage/#re-run-eleventy-when-you-save
The text was updated successfully, but these errors were encountered: