From 9a4636906238374a4f110b86ba5d3c841b697ba2 Mon Sep 17 00:00:00 2001 From: Bogdan Mateescu <52697314+mateesville93@users.noreply.github.com> Date: Fri, 7 Jan 2022 12:02:26 +0200 Subject: [PATCH] Fix `open` option for `initBrowserSync` when using Docker (#3519) Co-authored-by: Bruno Alla --- {{cookiecutter.project_slug}}/gulpfile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index 013e8c8d..0f90be22 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -139,14 +139,16 @@ function initBrowserSync() { `${paths.js}/*.js`, `${paths.templates}/*.html` ], { + {%- if cookiecutter.use_docker == 'y' %} + // https://www.browsersync.io/docs/options/#option-open + // Disable as it doesn't work from inside a container + open: false, + {%- endif %} // https://www.browsersync.io/docs/options/#option-proxy proxy: { {%- if cookiecutter.use_docker == 'n' %} target: '127.0.0.1:8000', {%- else %} - // https://www.browsersync.io/docs/options/#option-open - // Disable as it doesn't work from inside a container - open: false, target: 'django:8000', {%- endif %} proxyReq: [