0.0.4 • Published 7 years ago

svg-path-loader v0.0.4

Weekly downloads
130
License
MIT
Repository
github
Last release
7 years ago

svg-path-loader

Codeship Status for svg-path-loader NPM version for svg-path-loader

Webpack loader to get the first path in an SVG file.

Install

npm i svg-path-loader

Usage

// Without a webpack loader config
import path1 from 'svg-path-loader!./image1.svg';

// With a webpack loader config
import path2 from './image2.svg';

// Construct your SVG
export default function Icon() {
  return (
    <svg height={16} width={16} viewBox="0 0 16 16">
      <path d={path1} />
    </svg>
  );
}

Webpack loader config

{
  test: /\.svg$/,
  loader: 'svg-path-loader',
}
0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

8 years ago

0.0.1

8 years ago