mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
33 lines
708 B
JavaScript
33 lines
708 B
JavaScript
|
/**
|
||
|
* Reference: https://react-svgr.com/docs/options/
|
||
|
*/
|
||
|
module.exports = {
|
||
|
icon: '{dir}/[name].gen.js',
|
||
|
typescript: true,
|
||
|
jsxRuntime: 'automatic',
|
||
|
outDir: './src/icons-gen',
|
||
|
template: require('./templates/icon'),
|
||
|
indexTemplate: require('./templates/index'),
|
||
|
memo: true,
|
||
|
svgoConfig: {
|
||
|
plugins: [
|
||
|
// Sanitise the SVGs
|
||
|
'removeScriptElement',
|
||
|
],
|
||
|
},
|
||
|
jsx: {
|
||
|
babelConfig: {
|
||
|
plugins: [
|
||
|
// Remove fill and id attributes from SVG child elements
|
||
|
[
|
||
|
'@svgr/babel-plugin-remove-jsx-attribute',
|
||
|
{
|
||
|
elements: ['path', 'g', 'clipPath'],
|
||
|
attributes: ['id', 'fill'],
|
||
|
},
|
||
|
],
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
};
|