4.0.0 • Published 2 months ago

@onyourmarks/webpack-svg-plugin v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

OYM Webpack SVG Plugin

Webpack plugin for converting SVG files to HTML

Install

npm install --save-dev oym-webpack-svg-plugin

Usage

In your webpack.config.js

var SvgPlugin = require('oym-webpack-svg-plugin');

module.exports = {
    // ...
    plugins: [
        new SvgPlugin(paths.SVG, {
            mode: {
                symbol: {
                    inline: true,
                },
            },
            dest: paths.DIST_PRIVATE + '/svg'
        }),
    ]
};

API:

// webpack.config.js

module.exports = {
    plugins: [
        new SvgPlugin(inputPath, options)
    ]
}

inputPath

Type: String

The path where SVG files are located

options

Type: Object

See https://github.com/jkphl/svg-sprite/blob/master/docs/configuration.md

License

MIT © On Your Marks

4.0.0

2 months ago