snowpack-plugin-svgr
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

snowpack-plugin-svgr

Use svgr to transform your SVGs into React components with Snowpack

npm i -D snowpack-plugin-svgr

Types Code coverage Build status NPM Version MIT License


Quick start

// snowpack.config.json
{
  "plugins": [["snowpack-plugin-svgr", { /* see "Plugin Options" below */ }]]
}

Plugin Options

interface SnowpackPluginSvgrOptions {
  /**
   * Includes only the  specified paths
   */
  include?: string[]
  /**
   * Excludes the specified paths
   */
  exclude?: string[]
  /**
   * These options are passed directly to babel.transformAsync()
   */
  babelOptions?: TransformOptions
  /**
   * These options are passed directly to `@svgr/core`'s `convert()` function
   * See: https://react-svgr.com/docs/options/
   */
  svgrOptions?: any
}

LICENSE

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    1,331
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    1,331
  • 0.1.1
    0
  • 0.1.0
    1

Package Sidebar

Install

npm i snowpack-plugin-svgr

Weekly Downloads

1,332

Version

0.1.2

License

MIT

Unpacked Size

38.9 kB

Total Files

19

Last publish

Collaborators

  • jaredlunde