html-injector icon indicating copy to clipboard operation
html-injector copied to clipboard

Impossible to inject HTML

Open Joramt opened this issue 7 years ago • 5 comments

Hey,

I dont know if this repo is still active, but i can't get the HTML injection to work. Here's my gilp file

gulp.task('serve', function() {


    bs.init({
        proxy : localhost:8092,
        open : true,
        plugins: [
            {
                module: "bs-html-injector",
                options: {
                    files: ["templates/*.html"]
                }
            }
        ]
    });

i've tried everything suggested, everything in the demo folder too and everytime it reloads my page instead of injecting it. What am i doing wrong ?

Joramt avatar Sep 29 '17 14:09 Joramt

Try changing

bs.init({

to

bs.init(null, {

mt-deva avatar Oct 18 '17 13:10 mt-deva

@Joramt did you manage to get it working?

I, too, am trying to inject html, and so it would be very helpful to know.

Sebastian-Nielsen avatar Jan 23 '21 13:01 Sebastian-Nielsen

This plugin is not compatible with all BrowserSync versions. I'm currently using it with BrowserSync 2.26.7 and it works quite well.

dominikkucharski avatar Jan 23 '21 15:01 dominikkucharski

This plugin is not compatible with all BrowserSync versions. I'm currently using it with BrowserSync 2.26.7 and it works quite well.

Oh, may I ask why you are not using this plugin with the newest BrowserSync version, is it because that exact version isn't compatible with this plugin`?

Sebastian-Nielsen avatar Jan 23 '21 21:01 Sebastian-Nielsen

Yep

dominikkucharski avatar Jan 24 '21 09:01 dominikkucharski