You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,26 @@ See the [BrowserSync API docs](http://www.browsersync.io/docs/api/) for initiali
42
42
- The `app.use` statement must come before any handlers that you want to integrate with BrowserSync. This includes both dynamic route handlers and static asset handlers.
43
43
- Injection only happens on responses with a `Content-Type` header of `text/html` and content containing a `</body>` or `</head>` tag.
44
44
45
-
## BrowserSync 1.x
45
+
## Compatibility
46
+
47
+
### BrowserSync 1.x
46
48
47
49
If you need to use BrowserSync 1.x, use [version 1.0.2](https://github.com/schmich/connect-browser-sync/releases/tag/v1.0.2) of this package.
48
50
51
+
### Turbolinks
52
+
53
+
Turbolinks and BrowserSync can conflict (see [turbolinks#147](https://github.com/turbolinks/turbolinks/issues/147) and [browser-sync#977](https://github.com/BrowserSync/browser-sync/issues/977)). As a workaround, you can inject the BrowserSync tags into `<head>` instead.
54
+
55
+
To inject the tags into `<head>`, specify `{ injectHead: true }`:
56
+
57
+
```javascript
58
+
if (app.get('env') ==='development') {
59
+
var browserSync =require('browser-sync');
60
+
var bs =browserSync.create().init({ logSnippet:false });
0 commit comments