mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 09:24:52 +03:00
Replace DummyWebpackLoader by the one from webpack_loader package
This commit is contained in:
parent
93f2a1e87c
commit
d4423d5166
|
@ -34,7 +34,7 @@ TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa F405
|
|||
# ------------------------------------------------------------------------------
|
||||
WEBPACK_LOADER["DEFAULT"][ # noqa F405
|
||||
"LOADER_CLASS"
|
||||
] = "{{cookiecutter.project_slug}}.utils.loaders.DummyWebpackLoader"
|
||||
] = "webpack_loader.loader.FakeWebpackLoader"
|
||||
|
||||
{%- endif %}
|
||||
# Your stuff...
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
]
|
Loading…
Reference in New Issue
Block a user