Skip to content

Importing scss files with custom path prefixes not working #22

Open
@eagle-r

Description

@eagle-r

From my reading of the docs, I thought I could add the following to my settings,

STATICFILES_DIRS = (
    ('css/bootstrap', _Path(BASE_DIR, 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap')),
    ('scss', _Path(BASE_DIR, 'django-site/django_app/static/scss')),
)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'compressor.finders.CompressorFinder',
)

Then, in my main scss file (django-site/django_app/static/scss/main.scss), use

// @import "../../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/variables";
@import "css/bootstrap/variables";

However, if I do, I get a CompileError: File to import not found or unreadable: css/bootstrap/variables even though the commented out relative path works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions