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

use hash in filename? #56

Open
Ginhing opened this issue Apr 8, 2017 · 10 comments
Open

use hash in filename? #56

Ginhing opened this issue Apr 8, 2017 · 10 comments

Comments

@Ginhing
Copy link

Ginhing commented Apr 8, 2017

Thank you for your great job!

Could I use the hash in the output file name just like mydll.[hash].js ?

@SimenB
Copy link
Owner

SimenB commented Apr 8, 2017

Could I use the hash in the output file name just like mydll.[hash].js?

What do you mean? Do you have some example config of what you want?

Thank you for your great job!

You're welcome, hope it's useful!

@Ginhing
Copy link
Author

Ginhing commented Apr 9, 2017 via email

@SimenB
Copy link
Owner

SimenB commented Apr 9, 2017

Ah, ok. That does not exist at the moment no. If you can figure out some API that's not too clunky, I'd be happy to merge a PR for it, though 😄

@Ginhing
Copy link
Author

Ginhing commented Apr 24, 2017

It seems that addFileToAssets method of html-webpack-plugin has a limitation on producing a hash. Maybe we should work on there.

@SimenB
Copy link
Owner

SimenB commented Apr 24, 2017

Yes, that's a good point. We'd have to either do some work in html-webpack-plugin, or doe something smart in this method: https://github.com/SimenB/add-asset-html-webpack-plugin/blob/e0ebc4c/src/addAllAssetsToCompilation.js#L24-L29

@nikolaas
Copy link

Hello. Is there any progress in the task? It will be useful for me.

@nikolaas
Copy link

In my task, I need to use a hash of the compilation in the file name, so now I have to use html-webpack-include-assets-plugin and copy-webpack-plugin. But I saw that you want to merge your project with html-webpack-include-assets-plugin. I would be glad to use add-asset-html-webpack-plugin if it allowed to specify the hash of the compilation in the asset name.

@artbase
Copy link

artbase commented Oct 17, 2017

Hi,
Do you do something with the task? It will be useful for me, too.

@SimenB
Copy link
Owner

SimenB commented Oct 21, 2017

I'd love to see a PR supporting this 🙂

@wuliupo
Copy link

wuliupo commented May 24, 2019

if there is a CDN pointing to source host, abcd.css?t=1234 will not be updated to new content.
So we need abcd.1234.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants