Usage¶
Template tags¶
The provided template tags must be loaded before they can be used:
{% load webpack_extras %}
Management commands¶
runserver
¶
$ django-admin runserver
If settings.DEBUG
is True
, this runs webpack with
--env.development --mode=development
.
collectstatic
¶
$ django-admin collectstatic
If settings.DEBUG
is True
, this runs webpack with
--env.development --mode=development
.
Otherwise, it runs webpack with --env.production --mode=production
.
webpack
¶
$ django-admin webpack
This command runs webpack. By default, it uses a development
environment.
Options:
--environment
Selects a build environment. It can be set toproduction
ordevelopment
.