Skip to content

Commit

Permalink
Use website custom svgo config file
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Nov 14, 2024
1 parent 334ee8f commit b50845b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ export default async function createConfigAsync() {
priority: null,
changefreq: null,
},
svgr: {
svgrConfig: {
svgoConfig: undefined, // Use .svgo.config.js
},
},
} satisfies Preset.Options,
],
],
Expand Down
29 changes: 29 additions & 0 deletions website/svgo.config.js
Original file line number Diff line number Diff line change
@@ -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,
},
},
],
};

0 comments on commit b50845b

Please sign in to comment.