Skip to content

Hashes in the path are not allowed #86

Description

@x-yuri

I'm able to do the following in webpack:

module.exports = {
    ...
    output: {
        path: path.resolve('../webpack_bundles/[hash]'),
        filename: '[name].js',
    },
    ...
};

But django-webpack-loader doesn't allow that. Here you expect to have a path to the chunk. But if the hash is in the path, it's not known in advance.

Can't we add, say, BUNDLE_DIR_PATH and do something along these lines?

import os.path
if 'BUNDLE_DIR_PATH' in self.config:
    relpath = os.path.relpath(chunk['path'], self.config['BUNDLE_DIR_PATH'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions