mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
33 lines
716 B
JavaScript
33 lines
716 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.cjs'),
|
|
indexTemplate: require('./templates/index.cjs'),
|
|
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'],
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
};
|