Hi, I think I found a bug, but it might be just misconfiguration.
I'm trying to use parcel with this plugin to bundle a Surplus.js app written in Typescript.
The problem can be reproduced with this tsx file:
project_path>yarn parcel build src/index.html
yarn run v1.7.0
$ project_path/node_modules/.bin/parcel build src/index.html
ร project_path/src/main.tsx: element missing close tag at line 1 col 12: ``<number> = [1, 2, 3];''
at ERR (project_path/node_modules/surplus/compiler/index.js:374:15)
at jsxElement (project_path/node_modules/surplus/compiler/index.js:165:17)
at program (project_path/node_modules/surplus/compiler/index.js:92:31)
at parse (project_path/node_modules/surplus/compiler/index.js:84:12)
at Object.compile (project_path/node_modules/surplus/compiler/index.js:1540:45)
at TSAsset.pretransform (project_path/node_modules/parcel-plugin-surplus/lib/surplus-asset.js:20:39)
at TSAsset.process (project_path/node_modules/parcel-bundler/src/Asset.js:202:18)
at <anonymous>
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This seems like the tsx source is ran through the surplus compiler before being compiled by the ts compiler, and the surplus compiler thinking this is a JSX starting tag.