Fix a couple of issues with Webpack + Docker

This commit is contained in:
Bruno Alla 2022-03-16 22:21:16 +00:00
parent 0d1fcf6d68
commit 4e690bf5fc
2 changed files with 6 additions and 0 deletions

View File

@ -124,7 +124,9 @@ services:
command: npm run dev
ports:
- "3000:3000"
{%- if cookiecutter.frontend_pipeline == 'Gulp' %}
# Expose browsersync UI: https://www.browsersync.io/docs/options/#option-ui
- "3001:3001"
{%- endif %}
{%- endif %}

View File

@ -7,7 +7,11 @@ module.exports = merge(commonConfig, {
devServer: {
port: 3000,
proxy: {
{%- if cookiecutter.use_docker == 'n' %}
'/': 'http://0.0.0.0:8000',
{%- else %}
'/': 'http://django:8000',
{%- endif %}
},
// We need hot=false (Disable HMR) to set liveReload=true
hot: false,