babel-plugin-inline-react-svg
babel-plugin-inline-react-svg copied to clipboard
A babel plugin that optimizes and inlines SVGs for your React Components.
If we enable the [`cacheDirectory` option of `babel-loader`](https://github.com/babel/babel-loader#options) changes to an icon do not trigger rebuilds of webpack 🤔 But changes in `.jsx`, `.js`, `.scss` etc. files do work even...
Hi there. Great plugin. However I was wondering if we can a load a SVG Sprite to use it's fragment identifiers and add a proper icon for it. So far...
This is a fully working update to `svgo@^1.0.3`, closing #34 on the way. Closes #34. Closes #44. Closes #45.
First of all, thanks for your work! Starting from Babel [7.5.2](https://github.com/babel/babel/releases/tag/v7.5.2) ([#10174](https://github.com/babel/babel/pull/10174/files#diff-2d91b3d8f43046bd933411373b3ff352R30) specifically), `console.warn`ings started to appear when using this plugin. It seems `babel-plugin-inline-react-svg` should be tweaked a bit to...
This provides an option (`spreadDefaultProps`) to spread the extra props from the top level `svg` element onto the props object, rather than statically assigning them as `defaultProps`. This gives users...
Tried to import svg flags using the following code, but it will not work due to this loader / svgo ``` import adFlagIcon from 'svg-country-flags/svg/ad.svg'; import aeFlagIcon from 'svg-country-flags/svg/ae.svg'; import...
Closes #62
Resolution of svg path with the code ``` const svgPath = resolveFrom(dirname(iconPath), path.node.source.value); ``` does not take into account any path aliases configured with help of `babel-plugin-module-resolver`.
**What we had before:** - react-svg-loader (400KB(!) minified + gzipped) **webpack.config.js:** test: /\.svg$/, use: [ 'babel-loader', { loader: 'react-svg-loader', options: { svgo: { plugins: [ { removeTitle: false }, ],...
My issue is that we want to use this babel transform just for icons that we want to style - inline icons that should have the same color as surrounding...