Skip to content

Commit

Permalink
Fix variable name casing in fileTransform (#7752)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislbr authored and mrmckeb committed Sep 30, 2019
1 parent c0d73ba commit fefd716
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-scripts/config/jest/fileTransform.js
Expand Up @@ -13,10 +13,10 @@ module.exports = {
if (filename.match(/\.svg$/)) {
// Based on how SVGR generates a component name:
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
const pascalCaseFileName = camelcase(path.parse(filename).name, {
const pascalCaseFilename = camelcase(path.parse(filename).name, {
pascalCase: true,
});
const componentName = `Svg${pascalCaseFileName}`;
const componentName = `Svg${pascalCaseFilename}`;
return `const React = require('react');
module.exports = {
__esModule: true,
Expand Down

0 comments on commit fefd716

Please sign in to comment.