@mapbox/svg-react-transformer-loader

2.1.0 • Public • Published

@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-loader

Usage

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.

/@mapbox/svg-react-transformer-loader/

    Package Sidebar

    Install

    npm i @mapbox/svg-react-transformer-loader

    Weekly Downloads

    57

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    10.6 kB

    Total Files

    9

    Last publish

    Collaborators

    • mbx-npm-ci-production
    • mbx-npm-ci-staging
    • mbx-npm-advanced-actions-production
    • mbx-npm-advanced-actions-staging
    • mbx-npm-09-production
    • mbx-npm-08-production
    • mbx-npm-07-production
    • mbx-npm-06-production
    • mbx-npm-05-production
    • mbx-npm-04-production
    • mbx-npm-03-production
    • mbx-npm-02-production
    • mbx-npm-01-production
    • mbx-npm-02-staging
    • mapbox-npm-01
    • mapbox-npm-02
    • mapbox-npm-07
    • mapbox-npm-03
    • mapbox-npm-04
    • mapbox-npm-09
    • mapbox-npm-05
    • mapbox-npm-06
    • mapbox-npm-08
    • mapbox-npm-advanced-actions
    • mapbox-npm-ci
    • mapbox-npm
    • mapbox-admin
    • mapbox-machine-user