timonweb / django-tailwind

Django + Tailwind CSS = 💚
https://django-tailwind.readthedocs.io
MIT License
1.45k stars 89 forks source link

`django-tailwind` should not have a hard dependency on `django-browser-reload` #162

Closed baseplate-admin closed 1 year ago

baseplate-admin commented 1 year ago

Hi there,

Thanks for creating this awesome package.

It seems that you have : https://github.com/timonweb/django-tailwind/blob/045c6dae75be0eb119b0a018b379a2ffb29fd034/pyproject.toml#L31

as a hard dependency for django-tailwind but it should be noted that to run django-tailwind in production django-browser-reload is not required. django-browser-reload is very useful when developing a website..

What should we do here :

  1. Make the django-browser-reload optional for those who wants to install it with django-tailwind. ( eg: pip install django-tailwind[reload] )
  2. Provide a link in the docs to inform user on django-browser-reload but not bundle it.

Reasoning :

  1. It removes a package from venv and thereby reducing its size. Specially since some systems like AWS Lambda has strict limit on venv size
  2. Code Reloading is not required in production.
  3. Frees up memory ( by not loading django-browser-reload into memory )
  4. Speeds up django ( because theres one less middleware )

Thanks for reading..

dyspop commented 1 year ago

I'm battling Reason 1 as we speak

baseplate-admin commented 1 year ago

Hi @timonweb,

Since the community actively wants this Feature, would you be willing to add this ?

cafalchio commented 1 year ago

Why not an optional feature?