babel-plugin-transform-strip-svg-sprite

1.1.0 • Public • Published

babel-plugin-transform-strip-svg-sprite

Note, this repo is still WIP

Use this module in your babel configuration to strip out the svg imports when using svg-sprite webpack loader

Useful if creating a bundle specific for the server

Installation

With npm do

npm install babel-plugin-transform-strip-svg-sprite --save-dev

add it to your webpack babel-loader configuration or .babelrc

...
loaders: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel',
        query: {
          cacheDirectory: true,
          presets: ['es2015', 'react'],
          plugins: [
            'transform-strip-svg-sprite'
          ]
        }
      }
...

License

MIT

/babel-plugin-transform-strip-svg-sprite/

    Package Sidebar

    Install

    npm i babel-plugin-transform-strip-svg-sprite

    Weekly Downloads

    6

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • taddei