Skip to content

How to copy only 'public' dir of my assets dir when i run collectstatic? #194

@marcosdoesit

Description

@marcosdoesit

i have the dir and files in my npm root project:
> ls assets
node_modules package-lock.json package.json postcss.config.js public src webpack-stats.json webpack.config.js

and when i run collectstatic:
> ls static
package-lock.json package.json postcss.config.js public src webpack-stats.json webpack.config.js

i want that this copy only the public dir, that contains my jss and css that will be used in django

my settings.py:

from pathlib import Path
BASE_DIR = Path(file).parents[1]

WEBPACK_LOADER = {
'DEFAULT': {
'CACHE': not DEBUG,
'BUNDLE_DIR_NAME': 'public/', # must end with slash
'STATS_FILE': BASE_DIR.joinpath('webpack-stats.json'),
'POLL_INTERVAL': 0.1,
'TIMEOUT': None,
'IGNORE': [r'.+.hot-update.js', r'.+.map']
}
}

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