-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
JSX option "preserve" discards whitespace #3818
Comments
I'm not sure why you're linking to version 0.19.11, which came out at the beginning of this year. In the very next version (version 0.19.12), this behavior was changed to do exactly what you're suggesting. So esbuild already works the way you want. You just need to use a newer release of esbuild. |
My apologies! I will blame it on having 1000 tabs open late at night and will try not to think about this when I'm trying to fall asleep for years to come. |
Ahh sorry again, there is a case which does repro in the latest version which explains how I noticed something wrong. I'll update the original issue text. |
The JSX preserve transform discards leading whitespace within a JSXElement and prior to a child JSXElement, and discards trailing whitespace after a child JSXElement . See this example here where the output JSX for
Foo
should contain more whitespace at the start and end of the component.
The text was updated successfully, but these errors were encountered: