Go for a more generic js bundling architecture

* Don't tie the output name to webpack itself
* Don't call js bundling webpack in python code
* Make the doc more generic about js bundling
This commit is contained in:
2024-11-18 15:36:05 +01:00
committed by Bartuccio Antoine
parent 3db1f592e2
commit 7b41051d0d
56 changed files with 73 additions and 73 deletions

View File

@ -4,7 +4,7 @@ from django.contrib.staticfiles import utils
from django.contrib.staticfiles.finders import FileSystemFinder
from django.core.files.storage import FileSystemStorage
from staticfiles.apps import GENERATED_ROOT, IGNORE_PATTERNS_WEBPACK
from staticfiles.apps import GENERATED_ROOT, IGNORE_PATTERNS_BUNDLED
class GeneratedFilesFinder(FileSystemFinder):
@ -27,9 +27,9 @@ class GeneratedFilesFinder(FileSystemFinder):
continue
ignored = ignore_patterns
# We don't want to ignore webpack files in the generated folder
# We don't want to ignore bundled files in the generated folder
if root == GENERATED_ROOT:
ignored = list(set(ignored) - set(IGNORE_PATTERNS_WEBPACK))
ignored = list(set(ignored) - set(IGNORE_PATTERNS_BUNDLED))
storage = self.storages[root]
for path in utils.get_files(storage, ignored):