Fix open option for initBrowserSync when using Docker (#3519)

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
This commit is contained in:
Bogdan Mateescu 2022-01-07 12:02:26 +02:00 committed by GitHub
parent 4745805fd4
commit 9a46369062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,14 +139,16 @@ function initBrowserSync() {
`${paths.js}/*.js`, `${paths.js}/*.js`,
`${paths.templates}/*.html` `${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 // https://www.browsersync.io/docs/options/#option-proxy
proxy: { proxy: {
{%- if cookiecutter.use_docker == 'n' %} {%- if cookiecutter.use_docker == 'n' %}
target: '127.0.0.1:8000', target: '127.0.0.1:8000',
{%- else %} {%- else %}
// https://www.browsersync.io/docs/options/#option-open
// Disable as it doesn't work from inside a container
open: false,
target: 'django:8000', target: 'django:8000',
{%- endif %} {%- endif %}
proxyReq: [ proxyReq: [