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

Can not detect image if url has ?=rand123456 #96

Closed
tinamore opened this issue Aug 5, 2019 · 1 comment
Closed

Can not detect image if url has ?=rand123456 #96

tinamore opened this issue Aug 5, 2019 · 1 comment

Comments

@tinamore
Copy link

tinamore commented Aug 5, 2019

Hi,
Has bug in code loadjs:
if url image has ?=..... then loadjs not detect is image
example:

loadjs(['/images/sprite/hsp2_v2.png?vsk=1564236054', '/images/sprite/hsp1.png?vsk=1564236054'], function() {
  /* cache image */
});

then browser network will load with javascript not image.
2019-08-05_10-39-16

I think regex to css identifier or Image should be:

if (/(^css!|\.css.*$)/.test(path)) {

} else if (/(^img!|\.(png|gif|jpg|svg).*$)/.test(path)) {

Thanks

@amorey
Copy link
Member

amorey commented Sep 25, 2019

This has been fixed in v4.0.0: #97. Apologies for the delay.

@amorey amorey closed this as completed Sep 25, 2019
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