react-svg-loader icon indicating copy to clipboard operation
react-svg-loader copied to clipboard

Ability to specify the name of the generated component

Open lagunovsky opened this issue 4 years ago • 0 comments

{
  test: /\.svg$/,
  use: [{ 
    loader: 'react-svg-loader', 
    options: {
      componentName: (resource: string) => {
        return config.environment.production === true
          ? null
          : upperFirst(camelCase(path.parse(resource).name))
      },
    } 
  }]
}

lagunovsky avatar Oct 13 '21 15:10 lagunovsky