Open
Description
It would be great if this supported your defined custom webpack loaders, so we could use SVG's as components and have them auto imported.
I wish we could do this:
// In template
<template>
<svg-logo/>
</template>
// nuxt.config.js
components: [
{ path: "~/components", extensions: ["vue"] },
{ path: "~/assets/svgs/", prefix: "svg", extensions: ["svg"] }
],
build: {
extend(config, { isDev, isClient }) {
// Add SVG loader
config.module.rules.push({
test: /\.svg$/,
use: [
"babel-loader",
{
loader: "vue-svg-loader",
options: {
svgo: {
plugins: [{ removeViewBox: false }]
}
}
}
]
})
}
Metadata
Metadata
Assignees
Labels
No labels