nuxt-svg-loader icon indicating copy to clipboard operation
nuxt-svg-loader copied to clipboard

doc(readme): add information for typescript user

Open RomainLanz opened this issue 6 years ago • 2 comments

Hey 👋

When using this package with TypeScript the engine doesn't know by default how to deal with svg file. Therefore we need to defer the type for these imports.

More information: https://webpack.js.org/guides/typescript/#importing-other-assets

RomainLanz avatar Mar 04 '19 18:03 RomainLanz

Actually after some thinking I believe it would be better if this package directly add the type and people simply updates their tsconfig.json to add nuxt-svg-loader in the types array.

What do you think is the best?

RomainLanz avatar Mar 04 '19 23:03 RomainLanz

@RomainLanz I'm happy with including the types. On the other hand, that might be an issue for https://github.com/egoist/svg-to-vue-component instead (the underlying package) :thinking:

TheAlexLichter avatar Mar 07 '19 23:03 TheAlexLichter