C
C
coderxx2018-12-15 17:36:10
Web development
coderxx, 2018-12-15 17:36:10

I configure browserSync to work through a proxy - why do the styles fly off?

In the usual configuration of the browserSync task, everything works stably:

gulp.task('browser-sync', function() {
  browserSync({
    server: {
      baseDir: 'app'
    },
    notify: false,
    browser: 'google chrome',
  })
});

When switching to work from a local server, you have to register a proxy:
gulp.task('browser-sync', function() { //In case of php-project
  browserSync({
    proxy: "http://localhost:8888/untitled/app/",
    notify: false,
    browser: 'google chrome',
  })
});

In this case, the styles completely fly off .
What could be the reason?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question