cookiecutter-django/{{cookiecutter.project_slug}}/webpack/dev.config.js
Bruno Alla cbb0e19de7
Add Webpack support (#3623)
* Add support for Webpack as frontend pipeline

* Rename CI jobs

* Fix a couple of issues with Webpack + Docker

* Don't include Boostrap CSS from CDN with Webpack

* Rename variable

* Set publicPath in prod webpack config

* Fix removal of SASS files in post-gen hooks

* Add Webpack to readme usage section

* Run Django + Webpack dev server concurrently without Docker

* Fix async runserver command with Gulp/Webpack

* Upgrade django-webpack-loader to 1.5.0

* Pass variables required by Webpack at build time

* Upgrade django-webpack-loader to 1.7.0

* Add missing condition

* Add support for Azure Storage + Webpack

* Whitespaces

* Rename ROOT_DIR -> BASE_DIR

* Rename jobs

* Bump django-webpack-loader to latest

* Document limitation of Docker + Webpack + no Whitenoise

* Update section on custom Bootstrap compilation in generated readme
2023-01-29 12:12:12 +00:00

21 lines
499 B
JavaScript

const { merge } = require('webpack-merge');
const commonConfig = require('./common.config');
module.exports = merge(commonConfig, {
mode: 'development',
devtool: 'inline-source-map',
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,
liveReload: true,
},
});