Skip to content

webpack_static does not return filename with hash #138

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

Closed
Pacu2 opened this issue Dec 1, 2017 · 4 comments
Closed

webpack_static does not return filename with hash #138

Pacu2 opened this issue Dec 1, 2017 · 4 comments

Comments

@Pacu2
Copy link

Pacu2 commented Dec 1, 2017

On production, while using:
{% webpack_static 'filename.css' %}
I think it should resolve to /some/dir/filename.hash.css rather than /some/dir/filename.css

It would allow me to get URLs for prefetching/preloading.
Shouldn't webpack_static follow render_bundle behavior and return hashed version of file?

I cannot use render_bundle as .css file tag is created with type="text/css" rel="stylesheet" attributes.

@graingert
Copy link

You can use get_file for css. I've got the same issue but for a .png.

These assets don't get placed into webpack-stats.json

@owais
Copy link
Collaborator

owais commented Apr 3, 2018

This is a known limitation and there have been some discussions on http://github.com/owais/webpack-bundle-tracker to solve this but no one has come up with an implementation yet. Brief description of how I'd like to solve this. django-webpack/webpack-bundle-tracker#17 (comment)

PR or other suggestions welcome.

@sykp241095
Copy link

Oh, I am also waiting for this feature.

@fjsj
Copy link
Member

fjsj commented Mar 9, 2023

Not supported, but please feel free to open PRs implementing this.
Closing as duplicate of #343

@fjsj fjsj closed this as completed Mar 9, 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

5 participants