Replace DummyWebpackLoader by the one from webpack_loader package

This commit is contained in:
Bruno Alla 2023-02-06 14:49:03 +00:00
parent 93f2a1e87c
commit d4423d5166
No known key found for this signature in database
2 changed files with 1 additions and 17 deletions

View File

@ -34,7 +34,7 @@ TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa F405
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
WEBPACK_LOADER["DEFAULT"][ # noqa F405 WEBPACK_LOADER["DEFAULT"][ # noqa F405
"LOADER_CLASS" "LOADER_CLASS"
] = "{{cookiecutter.project_slug}}.utils.loaders.DummyWebpackLoader" ] = "webpack_loader.loader.FakeWebpackLoader"
{%- endif %} {%- endif %}
# Your stuff... # Your stuff...

View File

@ -1,16 +0,0 @@
from webpack_loader.loader import WebpackLoader
class DummyWebpackLoader(WebpackLoader):
def get_bundle(self, _bundle_name: str):
"""
Dummy loader to run tests.
Needed to run tests without webpack stats file nor bundle built.
"""
return [
{
"name": "test.bundle.js",
"url": "http://localhost/static/bundles/test.bundle.js",
},
]