Skip to content

onyourmarks-agency/oym-webpack-svg-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Webpack SVG plugin for converting single SVG files to a sprite

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors