Hi, I’m using the newish @bep esbuild Hugo pipeline https://gohugo.io/hugo-pipes/js/ as mentioned here: React Hugo Starter i.e. it requires Hugo >= 0.74.2 !!
Now I’m trying to get a more complex React project running within Hugo here: https://github.com/dayhaysoos/use-shopping-cart/tree/master/examples/cra
And I’m hitting this error: Error building site: JSBUILD: failed to transform “index.jsx” (text/jsx): Unexpected “<” despite there is not JSX angled brackets in https://github.com/kaihendry/react-hugo-esbuild/blob/uSC-cra/assets/index.jsx
Sorry, the React / build chain is something I am a bit uncertain about. So any debug info or pointers would be great. I think it might be an esbuild issue and I need Babel. Btw I don’t know if https://gohugo.io/hugo-pipes/babel/ is supposed to be married with https://gohugo.io/hugo-pipes/js/ somehow??
Nonetheless I did try creating another project https://github.com/kaihendry/react-hugo-babel but that has its own problems. It moans about require is not defined and I have no idea how to fix it. cc @jmooring Many thanks!