diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-18 14:05:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-18 14:05:41 +0100 |
| commit | e10c1688f96e3b2d202fe401472b7b25f6105969 (patch) | |
| tree | 741b2ca1f5638427b0da833e157a8f5991689aec /docs | |
| parent | 2ffa815c734e12262a3cb8ce5664f297128ae47f (diff) | |
Fixed #34322 -- Made ES module support to ManifestStaticFilesStorage optional.
Co-authored-by: Author: Claude Paroz <claude@2xlibre.net>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/staticfiles.txt | 9 | ||||
| -rw-r--r-- | docs/releases/4.2.txt | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt index 1b5c4b6abc..d446f833ea 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. @@ -342,8 +347,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 |
