summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-03-18 14:05:41 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-03-18 14:06:09 +0100
commitf2923306f152ed4e385e0544f8bc615d7d65c797 (patch)
tree399599a3b4df04a515f570738accd4766a5b83bc /docs
parenteff2ba3f8d2f172c64b9df08db8d188e11bae855 (diff)
[4.2.x] Fixed #34322 -- Made ES module support to ManifestStaticFilesStorage optional.
Co-authored-by: Author: Claude Paroz <claude@2xlibre.net> Backport of e10c1688f96e3b2d202fe401472b7b25f6105969 from main
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/staticfiles.txt9
-rw-r--r--docs/releases/4.2.txt6
2 files changed, 11 insertions, 4 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index 61ebd89d5e..94806d39a8 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -300,6 +300,11 @@ method). The regular expressions used to find those paths
* The `@import`_ rule and `url()`_ statement of `Cascading Style Sheets`_.
* `Source map`_ comments in CSS and JavaScript files.
+
+Subclass ``ManifestStaticFilesStorage`` and set the
+``support_js_module_import_aggregation`` attribute to ``True``, if you want to
+use the experimental regular expressions to cover:
+
* The `modules import`_ in JavaScript.
* The `modules aggregation`_ in JavaScript.
@@ -346,8 +351,8 @@ argument. For example::
.. versionchanged:: 4.2
- Support for finding paths to JavaScript modules in ``import`` and
- ``export`` statements was added.
+ Experimental optional support for finding paths to JavaScript modules in
+ ``import`` and ``export`` statements was added.
.. attribute:: storage.ManifestStaticFilesStorage.manifest_hash
diff --git a/docs/releases/4.2.txt b/docs/releases/4.2.txt
index be47767bf6..0fb3e4a2d9 100644
--- a/docs/releases/4.2.txt
+++ b/docs/releases/4.2.txt
@@ -202,8 +202,10 @@ Minor features
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* :class:`~django.contrib.staticfiles.storage.ManifestStaticFilesStorage` now
- replaces paths to JavaScript modules in ``import`` and ``export`` statements
- with their hashed counterparts.
+ has experimental support for replacing paths to JavaScript modules in
+ ``import`` and ``export`` statements with their hashed counterparts. If you
+ want to try it, subclass ``ManifestStaticFilesStorage`` and set the
+ ``support_js_module_import_aggregation`` attribute to ``True``.
* The new :attr:`.ManifestStaticFilesStorage.manifest_hash` attribute provides
a hash over all files in the manifest and changes whenever one of the files