-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fix default previews #950
Fix default previews #950
Conversation
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@@ -29,6 +29,15 @@ webpackRules.RULE_SCSS.use = [ | |||
}, | |||
] | |||
|
|||
// Load raw SVGs to be able to inject them via v-html | |||
webpackRules.RULE_ASSETS.test = /\.(png|jpe?g|gif|woff2?|eot|ttf)$/ | |||
webpackRules.RULE_RAW_SVGS = { |
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.
Fancy 😍
Love that we can do that and it stays clean!
/backport to stable23 |
/backport to stable22 |
/backport to stable21 |
The backport to stable23 failed. Please do this backport manually. |
The backport to stable22 failed. Please do this backport manually. |
The backport to stable21 failed. Please do this backport manually. |
Backport of #950 Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Backport of #950 Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Fix #909
Some default preview SVGs are not shown correctly because they are imported using the wrong loader. In some places (ref #842) this has already been fixed.
I changed some webpack rules to force the usage of
raw-loader
for all SVGs to bypass the!raw-loader!...
hack. This is needed because they are inserted usingv-html
and the default loader (asset/inline
) from our shared config producesdata:image/svg+xml
blobs.PS: The attribute
xlink:href
is deprecated in favor of justhref
(ref https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href).