-
Notifications
You must be signed in to change notification settings - Fork 214
Set name defaults for file/url-loader #435
Set name defaults for file/url-loader #435
Conversation
packages/image-loader/index.js
Outdated
.rule('svg') | ||
.test(/\.svg(\?v=\d+\.\d+\.\d+)?$/) | ||
.use('url') | ||
.loader(urlLoader) | ||
.options(merge({ limit }, options.svg || {})); | ||
.options(merge({ limit, name }, options.svg)); |
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.
options.svg || {}
packages/image-loader/index.js
Outdated
.rule('img') | ||
.test(/\.(png|jpg|jpeg|gif)(\?v=\d+\.\d+\.\d+)?$/) | ||
.use('url') | ||
.loader(urlLoader) | ||
.options(merge({ limit }, options.img || {})); | ||
.options(merge({ limit, name }, options.img)); |
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.
options.img || {}
packages/image-loader/index.js
Outdated
.rule('ico') | ||
.test(/\.ico(\?v=\d+\.\d+\.\d+)?$/) | ||
.use('url') | ||
.loader(urlLoader) | ||
.options(merge({ limit }, options.ico || {})); | ||
.options(merge({ limit, name }, options.ico)); |
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.
options.ico || {}
My bad, changes made. |
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.
LGTM!
I'd have to look in more detail, but some of the changes in the other PR seem borderline breaking, depending on the weird and wonderful things other people are doing :-) |
@edmorley @eliperelman I did a quick review of the borderline-breaking issues here: #434 (comment) |
Agreed, this would probably be breaking, we can ship this for v8, and explore demand for v7. |
This provides predictable paths for when using dev-server.
This makes for easier use in a server-side context, and makes things more consistent with how js is named and rev'd.