No hash value causes the cache problem
See original GitHub issueDescribe the issue / bug.
No hash value causes the cache problem
How can I reproduce this problem?
assets/image/a/1.png assets/image/b/1.png when you use both at the same time, a/1.png will be replaced by b/1.png because their names are the same
bugfix
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
use: {
loader: 'url-loader',
query: {
limit: 10000,
name: 'imgs/[name].[hash:7].[ext]'
}
}
},
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Why doesn't String's hashCode() cache 0? - Stack Overflow
The value zero is reserved as meaning "the hash code is not cached". What is the probability that a Java string hashes to...
Read more >Caching issues - Streamlit Docs
Streamlit raises this error whenever it encounters a type it doesn't know how to hash. This could be either when hashing the inputs...
Read more >Error message re: cache, hash | WordPress.org
Initially, I got one or two instances of a nonce error message. I then got repeated errors citing cache-related issues, possible changes to...
Read more >Bust That Cache Through A Content Hash - Alain Schlesser
The problem with this approach is that depending on what servers the visitor's connection is passing through, the assets will not be cached...
Read more >Query task [hash] results not found in cache (Community)
This problem can arise when, while the underlying queries are running, the cache for one or more of the source queries expires. For...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The problem that @chenweiqun originally mentioned would produce the following output, which contains only 1
logo.pnginstead of 2 differentlogo.pngs.Because both
a/logo.pngandb/logo.pnghave the same filename, only the latter is produced sincea/logo.pnggets overwritten byb/logo.png. Applying the[path]can ensure both assets are properly produced. It would be worth creating a PR tofile-loaderto create another hashing option based on the file path.This is more of a
webpacksituation, as it is able to step into all component file imports and pass them through tourl-loader/file-loader. Importing assets inside components throughvue-loaderand/or accessing them directly fromstatic/is avuejs-templates/webpackimplementation that has been adopted by many users. Supporting both is necessary for certain frameworks that can internally require their own assets, therefore allowingwebpackto further optimize outputs when possible. electron-vue mirrors that approach already, so the above change does not impact users. In the end,srcis not just for text files.Added in https://github.com/SimulatedGREG/electron-vue/commit/f28f53a218eb60627f613fe9c898ddfca9eac5a7