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

Keeping line breaks in the transformed code #1003

Open
techquestions opened this issue Mar 28, 2021 · 1 comment
Open

Keeping line breaks in the transformed code #1003

techquestions opened this issue Mar 28, 2021 · 1 comment

Comments

@techquestions
Copy link

Is your feature request related to a problem? Please describe.
I couldn't find an option to keep the line breaks in the transformed code (while having some selected options, like mangle, set to true). Whatever option combination I try, the minified code always ends up with line breaks remove. I know that minify is minifier and removing line breaks is the first thing most of the people looks for in a minifier but still, there are some cases when not removing line breaks is what user wants.

Describe the solution you'd like
I think adding an option to leave the line breaks as is (except of course for some inlining, etc. that will remove the line breaks anyways) is the right way to go.
Would you be open for such change?

@nicolo-ribaudo
Copy link
Member

You can try using the retainLines option: https://babeljs.io/docs/en/options#retainlines

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

No branches or pull requests

2 participants