JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 68
  • Score
    100M100P100Q51737F
  • License MIT

Webpack loader to transform SVG files into React components

Package Exports

  • @mapbox/svg-react-transformer-loader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mapbox/svg-react-transformer-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@mapbox/svg-react-transformer-loader

Build Status

Webpack loader to transform SVG files into React components.

Runs SVG files through the toComponentModule function of svg-react-transformer.

You can pass all of the options from toComponentModule (e.g. SVGO plugins, a component template).

The output of the default template includes JSX and ES2015 (class). By default, the output of this loader is precompiled with Babel. You can bypass this step (and set up your own compilation) by passing the option precompile: false.