"How can I incorporate both JS and JSX files within a Rails 7 application using esbuild?"

“If I specify ‘–loader: .js=jsx’ in my script command for building a Rails 7 app with esbuild, it interprets both JS and JSX as JSX, leaving no interpreter for plain JS. How can I configure the loader to differentiate between .js and .jsx files, such as ‘–loader: .js=js .jsx=jsx’?”