-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Accept version when loading fonts e.g. font-awesome #298
Conversation
Shouldn't we allow any query string parameters? They wouldn't have any effect anyway. |
Ah, I think you're right. Can't think of any harm it could do. |
5519c92
to
86d21e2
Compare
How about this now? |
Why not just (?.*)? |
I thought about this but somehow it seemed safer to enforce the query string structure. Not sure what exactly I was worried about, sorry 😒 |
86d21e2
to
27917a1
Compare
@@ -73,7 +73,7 @@ module.exports = { | |||
loader: 'json' | |||
}, | |||
{ | |||
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)$/, | |||
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)(\?.*)?$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also worth doing for mp4/webm in the loader a few lines below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm not sure how else it's used in the wild, only encountered it with fonts. I wonder if other assets like CSS may need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's relevant for anything that can be referenced in CSS. So CSS itself won't need it but any files will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relevant for url(font.woff?v=1.3)
in some CSS libs. webpack 2 doesn't need this anymore. cc @mxstbr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does webpack 2 not need this anymore? What am I missing here?
Fixes #295. The version is optional so I didn't extract font extensions into a separate loader.