diff --git a/django_vite/templatetags/django_vite.py b/django_vite/templatetags/django_vite.py index fdb3304..1289a11 100644 --- a/django_vite/templatetags/django_vite.py +++ b/django_vite/templatetags/django_vite.py @@ -540,12 +540,16 @@ def _generate_vite_server_url(path: str) -> str: ) @classmethod - def generate_vite_react_refresh_url(cls) -> str: + def generate_vite_react_refresh_url(cls, **kwargs) -> str: """ Generates the script for the Vite React Refresh for HMR. Only used in development, in production this method returns an empty string. + Keyword Arguments: + **kwargs {Dict[str, str]} -- Adds new attributes to generated + script tags. + Returns: str -- The script or an empty string. """ @@ -553,7 +557,9 @@ def generate_vite_react_refresh_url(cls) -> str: if not DJANGO_VITE_DEV_MODE: return "" - return f"""