Django-pipeline collect my statics in dev

29 Views Asked by At

I use Django-pipeline on my project.

Here are the configurations:

STATIC_URL = '/static/'
MEDIA_URL = '/media/'

STATICFILES_DIRS = [
    BASE_DIR / "static",
]

STATIC_ROOT = os.path.join(BASE_DIR, 'zstatics')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
)
PIPELINE = {
    'PIPELINE_COLLECTOR_ENABLED': False,
    'PIPELINE_ENABLED': False,
    'CSS_COMPRESSOR': None,
    'JS_COMPRESSOR': None,
    'JAVASCRIPT': {
        'unauthenticated_main': {
            'source_filenames': (
                'website/js/theme.bundle.min.js',
                'js/htmx.min.js',
                'website/vendors/js/prism.min.js',
                'js/copyleft.min.js',
                'js/unauthenticated_custom.min.js',
                'js/oqb.min.js',
            ),
            'output_filename': 'compressed/unauthmain.min.js',
        }
    }
}

It works quite well but in development mode with DEBUG=False it collects my files anyway, and minify them in double and I got new files in zstatics, the files declared in the dictionary. for example I got a 'js/htmx.min.js' file and a 'js/htmx.min..min.js' file which is quite weird.

Any idea where I failed in the configuration?

0

There are 0 best solutions below