diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index b52e5c859a7a..852a0b4e3c83 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -547,6 +547,11 @@ export default async function createConfigAsync() { priority: null, changefreq: null, }, + svgr: { + svgrConfig: { + svgoConfig: undefined, // Use .svgo.config.js + }, + }, } satisfies Preset.Options, ], ], diff --git a/website/svgo.config.js b/website/svgo.config.js new file mode 100644 index 000000000000..be70fc07fc59 --- /dev/null +++ b/website/svgo.config.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const path = require('path'); + +module.exports = { + plugins: [ + { + name: 'preset-default', + params: { + overrides: { + removeTitle: false, + removeViewBox: false, + }, + }, + }, + { + name: 'prefixIds', + params: { + delim: '', + prefix: (_, info) => path.parse(info.path).name, + }, + }, + ], +};