Update server proxy syntax for webpack-dev-server@v5

This commit is contained in:
Bruno Alla 2024-02-21 21:28:09 +00:00
parent 6949cfe496
commit 70cc9782cf

View File

@ -6,13 +6,16 @@ module.exports = merge(commonConfig, {
devtool: 'inline-source-map', devtool: 'inline-source-map',
devServer: { devServer: {
port: 3000, port: 3000,
proxy: { proxy: [
{
context: ['/'],
{%- if cookiecutter.use_docker == 'n' %} {%- if cookiecutter.use_docker == 'n' %}
'/': 'http://0.0.0.0:8000', target: 'http://0.0.0.0:8000',
{%- else %} {%- else %}
'/': 'http://django:8000', target: 'http://django:8000',
{%- endif %} {%- endif %}
}, },
],
client: { client: {
overlay: { overlay: {
errors: true, errors: true,