svgr icon indicating copy to clipboard operation
svgr copied to clipboard

feat: export `LoaderOptions` from `@svgr/webpack`

Open nix6839 opened this issue 1 year ago • 1 comments

Summary

When passing options to @svgr/webpack, I'd like to write them with typing like this:

rules: [{
  test: /\.svg$/i,
  issuer: /\.[jt]sx?$/,
  use: [{
    loader: '@svgr/webpack',
    /** @type {import('@svgr/webpack').LoaderOptions} */
    options: { icon: true } }],
}],

I can import the Config type from @svgr/core, but package managers like pnpm need to install @svgr/core for that.

nix6839 avatar Oct 11 '23 00:10 nix6839

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svgr ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2023 0:56am

vercel[bot] avatar Oct 11 '23 00:10 vercel[bot]