-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
Empty lines between imports and component are removed instead of collapsed #774
Comments
Hello @bensampaio, as you can see in the tests, line returns are preserved. It should be an issue on your side. Feel free to submit a PR for a fix if you found the origin of the problem. Else it will not be fixed since it affects only you and it has no repro. |
Hi @gregberge, thank you for your reply. I created a repo where I reproduced the issue. You can see it here. Follow the instructions in the README to see what happens.
It seems to be related to |
I'm experiencing this bug too. As a workaround, I added the blank lines back via regex: |
Thanks @bensampaio, I will give a look. Feel free to try to fix it, but I suspect a bug in Babel template. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
🐛 Bug Report
After upgrading from v5 to v6 the template no longer keeps an empty line between the imports and component.
To Reproduce
Steps to reproduce the behavior:
I am using the following template:
And the following plugins:
Everything seems to work fine except that the empty lines in the template are removed instead of collapsed.
Expected behavior
Empty line between the imports and the component as shown below.
Link to repl or repo (highly encouraged)
Clone this repo and follow the instructions in the README.
Run
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
Paste the results here:
The text was updated successfully, but these errors were encountered: