Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hashes in the path are not allowed #86

Open
x-yuri opened this issue Nov 19, 2016 · 0 comments
Open

Hashes in the path are not allowed #86

x-yuri opened this issue Nov 19, 2016 · 0 comments

Comments

@x-yuri
Copy link

x-yuri commented Nov 19, 2016

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'])
@fjsj fjsj closed this as completed Nov 29, 2023
@fjsj fjsj reopened this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants