protibimbok / django-vite-plugin

This plugin configures Vite for use with Django backend.
103 stars 13 forks source link

take default settings from global_settings #37

Closed protibimbok closed 1 year ago

protibimbok commented 1 year ago

The default settings are set to specific values:

{
    'DEV_MODE': getattr(settings, 'DEBUG', True),
    'BUILD_DIR': getattr(settings, 'STATIC_ROOT') or 'static',
    'BUILD_URL_PREFIX': getattr(settings, 'STATIC_URL'), # Manifest paths would be prefixed with this
}

These options should default to django defaults instead:

{
    'DEV_MODE': getattr(settings, 'DEBUG', global_settings.DEBUG),
    'BUILD_DIR': getattr(settings, 'STATIC_ROOT', global_settings.STATIC_ROOT),
    'BUILD_URL_PREFIX': getattr(settings, 'STATIC_URL', global_settings.STATIC_URL), # Manifest paths would be prefixed with this
}