Skip to content

misleading commentary in readme #100

@vadimadr

Description

@vadimadr

Example in readme states that BUNDLE_DIR_NAME option must be ended with slash:

WEBPACK_LOADER = {
    'DEFAULT': {
        'BUNDLE_DIR_NAME': 'bundles/' # end with slash
    }
}

However, I wanted webpack configuration that outputs bundle in root of staticfiles dir, so I created configuration like this:

WEBPACK_LOADER = {
    'DEFAULT': {
        'BUNDLE_DIR_NAME': '/',
        'STATS_FILE': os.path.join(ROOT_DIR, 'webpack-stats-dist.json'),
    }
}

And it lead me to pity errors as my staticfiles storage class was unable to find url for appropriate bundle files. 'BUNDLE_DIR_NAME': '', obviously, works.

I think this should be clarified.

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