You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use esbuild (v0.12.1) as a bundler for a React component library. This means that we need to use the ability to preserve jsx. But when we enable this configuration, in the generated bundle, the JSXIdentifier of the React component starts with a lowercase letter. This will break subsequent build tools, including esbuild.
The following is a minimal output example, the directory structure can be seen from the comments generated by esbuild.
The expected behavior is that the JSXIdentifier of react components still starts with a capital letter, so that the subsequent build process will not be broken.
The text was updated successfully, but these errors were encountered:
Makes sense. I wish JSX didn't have this distinction because there's no way to pass an arbitrary expression as a tag. Although an alternative could be to use a local variable with a capital letter I suppose.
I think it should be possible to ensure that these variables continue to start with capital letters. However, this will have to be implemented twice (once for minifyIdentifiers: false and once for minifyIdentifiers: true) since minified name assignment is a different code path than name collision avoidance.
We use esbuild (v0.12.1) as a bundler for a React component library. This means that we need to use the ability to preserve jsx. But when we enable this configuration, in the generated bundle, the JSXIdentifier of the React component starts with a lowercase letter. This will break subsequent build tools, including esbuild.
The following is a minimal output example, the directory structure can be seen from the comments generated by esbuild.
Pass the above bundle to esbuild again, the first parameter of the generated createElement function call is wrong.
The expected behavior is that the JSXIdentifier of react components still starts with a capital letter, so that the subsequent build process will not be broken.
The text was updated successfully, but these errors were encountered: