Skip to content

Commit

Permalink
refactor: update svgr config to the new major version
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosCortizasCT committed Sep 27, 2023
1 parent 40ceae4 commit 7306dfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion svgr.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const templateCreateStyledIcon = fs.readFileSync(
);

const indexTemplate = (filePaths) => {
const exportEntries = filePaths.map((filePath) => {
const exportEntries = filePaths.map(({ path: filePath }) => {
const basename = path.basename(filePath, path.extname(filePath));
const exportName = `${basename.replace(/react/i, 'Icon')}`;
return `export { default as ${exportName} } from './${basename}'`;
Expand Down

0 comments on commit 7306dfa

Please sign in to comment.