Skip to content

aria-hidden was transformed into camel case #221

@EnixCoda

Description

@EnixCoda

Hi, thanks for this awesome project!
I've just upgraded from svgr ^1.6.0 to @svgr/webpack ^4.0.0 and got new Error from console at runtime.

🐛 Bug Report

In console I got:
image

To Reproduce

With such svg file as input, which has aria-hidden attribute set.

<svg aria-hidden="true">
  ...
</svg>

I loaded it with @svgr/webpack:

  {
    test: /\.svg$/,
    use: [{
      loader: '@svgr/webpack',
      options: { svgo: false },
    }],
  },

Expected behavior

Not transpile aria-hidden in camel case. Then there should be no errors.

Run npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard

## System:
 - OS: macOS 10.14
 - CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
 - Memory: 612.10 MB / 16.00 GB
 - Shell: 5.3 - /bin/zsh
## Binaries:
 - Node: 10.12.0 - /usr/local/bin/node
 - Yarn: 1.10.1 - /usr/local/bin/yarn
 - npm: 6.4.1 - /usr/local/bin/npm
## npmPackages:
 - @svgr/webpack: ^4.0.0 => 4.0.0 

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions