I've been piecing together how to use this API from the main guide (the older examples won't load the jsx files) and I am having an issue bundling through esbuild which was used in some of the examples, albeit an older version. For whatever reason, esbuild recompiles the class syntax and then the ECMAscript interpreter can't recognize it. If I just reformat back then it works again, but this rules out bundling in my current config:
Before bundling:
After bundling:
So the top works, the bottom doesn't. What esbuild versions are you using or are there some special settings to use to prevent this? Otherwise it's just an esm compilation.
In the examples, the esbuild compilation still preseves the class x syntax instead of this odd var x = class { which anonymizes the class itself. This seems to be innate to esbuild.
I've been piecing together how to use this API from the main guide (the older examples won't load the jsx files) and I am having an issue bundling through esbuild which was used in some of the examples, albeit an older version. For whatever reason, esbuild recompiles the class syntax and then the ECMAscript interpreter can't recognize it. If I just reformat back then it works again, but this rules out bundling in my current config:
Before bundling:
After bundling:
So the top works, the bottom doesn't. What esbuild versions are you using or are there some special settings to use to prevent this? Otherwise it's just an esm compilation.
In the examples, the esbuild compilation still preseves the
class x
syntax instead of this odd var x = class { which anonymizes the class itself. This seems to be innate to esbuild.