-
Notifications
You must be signed in to change notification settings - Fork 12
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
How to inject CSS without reload? What am I doing wrong? #8
Comments
Hey @mdvorscak, did you perhaps get a chance to consider this question yet? I'm stuck :/ |
Does your |
@mhkeller thanks for suggestion! I do have body tags in my index, and I also tried moving around some of my handlebars templates to double check and am pretty sure that's not the issue. I'm getting a the full reload, which if I recall from other projects, would break without the tag. |
Hi @jamiewilson did you fix your issue ? I'm having exactly the same problem. Thank you |
I just quickly added this to index.js line 27 to fix function rebuild(event, file) {
if (!bs.paused) {
bs.pause();
metalsmith.build(function(err) {
var buildMessage = err ? err : 'Build successful';
debug(buildMessage);
bs.resume();
if (require('path').extname(file) === '.scss') {
bs.reload('*.css');
} else {
bs.reload();
}
});
}
} |
Here's my metalsmith pipeline:
Any ideas? Do I need to be running browsersync in a separate pipeline branch or something?
Also, I'm not getting any file change logs, just the reload:
The text was updated successfully, but these errors were encountered: