-
Notifications
You must be signed in to change notification settings - Fork 755
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
Browser-sync with Rails and turbolinks give white page #977
Comments
I'm not familiar with how turbo links work - but if you could provide a sample project/demo for me to try it on I can take a look :) |
Here is a basic Rails 4 project using Turbolinks and Gulp: https://github.com/anthony-robin/browsersync-turbolinks |
+1, got the same problem, running: |
+1, same here. browser-sync start --proxy localhost:3000 --files "**/*, \!tmp, \!log" In chrome console i get |
+1 I have same problem too |
+1 I also have this problem |
+1 here |
+1 having the exact same problem |
Same here, but has it ever worked with Turbolinks or is this a regression? I'm getting an error |
Hey you guys, I have the same problem and I fix it configuring rewriteRules: [
{
match: /<body/,
fn: function (match) {
return '<body data-no-turbolink="true" ';
}
}
] |
Good workaround but, actually fixing this would be awesome! |
+1 |
With turbolinks 5? How to fix? |
@mrkongo With turbolinks 5 the signature to disable it is |
But I need a way to fix this, because I need both Turbolinks and BrowserSync. Ho to do it? There is an alternative to BrowserSync with gulp? |
@mrkongo @sandrodz @anthony-robin and other guys, I found a way to fix this issue. Browsersync injects a script in html page inside snippetOptions: {
rule: {
match: /<\/head>/i,
fn: function (snippet, match) {
return snippet + match;
}
}
} Hope that it can help you :D |
@maykefreitas this would be a great wiki page! |
@swrobel good idea 👍 |
I really want to resolve this - can someone point me to a sample project that has a docker setup? |
@shakyShane not sure why you're asking about docker, but I'm using browserSync with docker, and turbo links on a small WordPress project, and its 100% with the options provided above by @maykefreitas. This is a non-issue for browserSync, as it caused by turbolinks replacing content in the body, and reloading any scripts inside the body. This is the expected behavior, in order to avoid this we simply have to move the browserSync script to the head. |
Hey guys, just created the Wiki page, sorry for the long delay. https://github.com/BrowserSync/browser-sync/wiki/Browsersync-for-Turbolinks cc: @swrobel |
I have setup browser-sync gulp plugin in my rails project and I had a white page issue when using turbolinks navigation. If I look at the source code, the page is properly sent to the browser but is not displayed.
Here is my browser-sync gulp code:
The text was updated successfully, but these errors were encountered: