Closed marialovesbeans closed 3 years ago
esbuild takes care of this using the Transform API (docs). This happens inside plugin-esbuild which we include in Snowpack, and we load by default if you haven’t specified another plugin for JS. But it’s also a good example of how pluggable Snowpack is—if you wanted to, you could copy this plugin, load it externally, and make whatever changes you’d like! Then you could run any transforms on JS you’d like to.
The guide says
Snowpack has built-in support for JSX and TypeScript transpilation
. However when fiddling through source code I cannot pinpoint the line where JSX transformation is performed. Can anyone please point out where exactly does this happen? I need to Monkey Patch something to test. Thanks so much!!