@toba/html-webpack-inline-svg
v1.0.10
Published
Toba svg-loader module
Readme
SVG Inliner for the Webpack HTML Plugin
Insert SVG files into index.html generated by the Webpack HTML plugin so they can be used within components.
Usage
yarn add @toba/html-webpack-inline-svg --devWithin Component
import prettyID from './images/pretty.svg';
const header = props => (
<svg viewBox="0 0 30 10">
<use href={prettyID} x="10" />
</svg>
);Webpack Configuration
import { HtmlSvgPlugin } from '@toba/html-webpack-inline-svg';
export = {
// ...
plugins: [new HtmlWebpackPlugin(), new HtmlSvgPlugin()];
}License
Copyright © 2019 Jason Abbott
This software is licensed under the MIT license. See the LICENSE file accompanying this software for terms of use.
