All Projects → cascornelissen → Svg Spritemap Webpack Plugin

cascornelissen / Svg Spritemap Webpack Plugin

Licence: mit
SVG spritemap plugin for webpack

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Svg Spritemap Webpack Plugin

Svg Sprite Loader
Webpack loader for creating SVG sprites.
Stars: ✭ 1,822 (+1038.75%)
Mutual labels:  webpack, webpack-plugin, svg
Size Plugin
Track compressed Webpack asset sizes over time.
Stars: ✭ 1,665 (+940.63%)
Mutual labels:  webpack, webpack-plugin
Webpack Visualizer
Visualize your Webpack bundle
Stars: ✭ 1,664 (+940%)
Mutual labels:  webpack, webpack-plugin
Webpack Require From
Webpack plugin that allows to configure path or URL for fetching dynamic imports
Stars: ✭ 142 (-11.25%)
Mutual labels:  webpack, webpack-plugin
Everything Is A Plugin
Everything is a Plugin: Mastering webpack from the inside out. NgConf 2017
Stars: ✭ 123 (-23.12%)
Mutual labels:  webpack, webpack-plugin
Terser Webpack Plugin
Terser Plugin
Stars: ✭ 1,687 (+954.38%)
Mutual labels:  webpack, webpack-plugin
Flowchart Vue
flowchart的vue版本
Stars: ✭ 136 (-15%)
Mutual labels:  webpack, svg
Vue Svg Inline Loader
Webpack loader used for inline replacement of SVG images with actual content of SVG files in Vue projects.
Stars: ✭ 105 (-34.37%)
Mutual labels:  webpack, svg
Worker Plugin
👩‍🏭 Adds native Web Worker bundling support to Webpack.
Stars: ✭ 1,840 (+1050%)
Mutual labels:  webpack, webpack-plugin
Bundle Stats
In-depth bundle analyzer for webpack(bundle size, assets, modules, packages)
Stars: ✭ 144 (-10%)
Mutual labels:  webpack, webpack-plugin
Obsolete Webpack Plugin
🌈 A Webpack plugin generates a browser-side standalone script that detects browser compatibility based on `Browserslist` and prompts website users to upgrade it.
Stars: ✭ 148 (-7.5%)
Mutual labels:  webpack, webpack-plugin
Teenyicons
Tiny minimal 1px icons designed to fit in the smallest places.
Stars: ✭ 1,631 (+919.38%)
Mutual labels:  svg-sprites, svg
Svgdragtree
一个可以通过拖放 SVG 图标,来生成拥有树状结构的视图与数据的前端组件。 SDT example:
Stars: ✭ 113 (-29.37%)
Mutual labels:  svg-sprites, svg
Rollbar Sourcemap Webpack Plugin
A Webpack plugin to upload sourcemaps to Rollbar
Stars: ✭ 127 (-20.62%)
Mutual labels:  webpack, webpack-plugin
Webpack Tools
☕️Just a simple webpack sample project.
Stars: ✭ 106 (-33.75%)
Mutual labels:  webpack, webpack-plugin
Clean Webpack Plugin
By default, this plugin will remove all files inside webpack's output.path directory, as well as all unused webpack assets after every successful rebuild.
Stars: ✭ 1,888 (+1080%)
Mutual labels:  webpack, webpack-plugin
Gas Webpack Plugin
Webpack plugin for Google Apps Script
Stars: ✭ 97 (-39.37%)
Mutual labels:  webpack, webpack-plugin
Conf
Landing page for event React Conf Brazil
Stars: ✭ 104 (-35%)
Mutual labels:  webpack, svg
Coreui Icons
CoreUI Free Icons - Premium designed free icon set with marks in SVG, Webfont and raster formats
Stars: ✭ 1,813 (+1033.13%)
Mutual labels:  svg-sprites, svg
Webpack Babel Multi Target Plugin
A Webpack plugin that works with Babel to allow differential loading - production deployment of ES2015 builds targeted to modern browsers, with an ES5 fallback for legacy browsers.
Stars: ✭ 150 (-6.25%)
Mutual labels:  webpack, webpack-plugin

SVG Spritemap Webpack Plugin

npm npm codevov license

This webpack plugin generates a single SVG spritemap containing multiple <symbol> elements from all .svg files in a directory. In addition, it can optimize the output and can also generate a stylesheet containing the sprites to be used directly from CSS. Chris Coyier has a good write-up about the why's and how's of this technique on CSS Tricks. Use it in combination with the svg4everybody package to easily and correctly load SVGs from the spritemap in all browsers.

Installation

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

Usage

Webpack configuration
This plugin can be added to webpack like any other, documentation on all configuration options is available.

const SVGSpritemapPlugin = require('svg-spritemap-webpack-plugin');

module.exports = {
    // ...
    plugins: [
        new SVGSpritemapPlugin()
    ]
}

SVG element
When there's a file phone.svg in the source directory and the prefix option is set to sprite- (default), the sprite can be included in a HTML-file like so:

<svg>
    <use xlink:href="/path/to/spritemap.svg#sprite-phone"></use>
</svg>

SVG4Everybody

SVG for Everybody adds SVG External Content support to all browsers.

It's a good idea to combine the svg-spritemap-webpack-plugin with svg4everybody. This can be done by passing an options object or true to the svg4everybody options key or by executing SVG4Everybody manually.

License

This project is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].