Package Exports
- @mapbox/svg-react-transformer-loader
- @mapbox/svg-react-transformer-loader/index.js
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
A Webpack loader to transform SVG files into React component modules.
Runs SVG files through the toComponentModule function of svg-react-transformer.
Please read the svg-react-transformer documentation for more details and code examples.
Installation
npm install @mapbox/svg-react-transformer-loaderUsage
Follow the instructions for using Webpack loaders.
You can pass all of the options from svg-react-transformer's toComponentModule function (e.g. SVGO plugins, a component template).
By default, the output of this loader is precompiled with Babel.
You can bypass this step (and use your own compilation) by passing the additional option precompile: false.