desvg
desvg copied to clipboard
Install/Usage steps not complete
Hi! Thanks for the library, I've found it really useful, but I don't think your install instructions are quite correct. You say that to use with webpack, all your need is:
npm install desvg-loader svg-loader --save-dev
and then configure webpack, with
npm install @kossnocorp/desvg --save
only being required to "use the low-level API, or to manage the core library version". However, the desvg-loader package requires this package: https://github.com/kossnocorp/desvg-loader/blob/master/react.js#L4
so without this package installed as well, you get an error.
Also the proposed webpack config won't work with newer versions of webpack:
use: [
'desvg/react',
'svg'
],
you need the "loader" suffix on both of those loader packages.
In my case what worked looked like this 👇
{
test: /\.svg$/,
use: [
{ loader: "desvg-loader/react" },
{ loader: "svg-loader" }
]
}
@j33n & @dave-irvine Thank you both, this saved me from giving up on this lib