Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Props destructuring occurs before width and height #277

Closed
DylanMerigaud opened this issue Feb 14, 2019 · 1 comment
Closed

Props destructuring occurs before width and height #277

DylanMerigaud opened this issue Feb 14, 2019 · 1 comment

Comments

@DylanMerigaud
Copy link

🐛 Bug Report

When icon parameter is passed and that the svg has no width and height the {...props} occurs before the width="1em" height="1em"

To Reproduce

Convert a svg file with not width and height props

Expected behavior

{...props} to be after width="1em" height="1em"

Link to repl or repo (highly encouraged)

https://github.com/DylanMerigaud/Bug_svgr_icon

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

## System:
 - OS: Linux 4.4 Ubuntu 18.04.1 LTS (Bionic Beaver)
 - CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
 - Memory: 3.72 GB / 15.85 GB
 - Shell: 5.4.2 - /usr/bin/zsh
## Binaries:
 - Node: 10.15.0 - /usr/bin/node
 - Yarn: 1.13.0 - /usr/bin/yarn
 - npm: 6.7.0 - /usr/bin/npm
## npmPackages:
 - @svgr/cli: ^4.1.0 => 4.1.0
@gregberge
Copy link
Owner

Hello @DylanMerigaud, thanks for this report. I think it is a problem in the Babel plugin order, we have figure out how to ensure that the props spread is at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants