thirdweb-dev / react

Ultimate collection of React hooks for your web3 apps
https://docs.thirdweb.com/react
Apache License 2.0
81 stars 29 forks source link

Getting Uncaught SyntaxError: Unexpected template string on production build with NextJS #24

Open mhroes9627 opened 2 years ago

mhroes9627 commented 2 years ago

Currently using NextJS for frontend and turborepo

Console error

Uncaught SyntaxError: Unexpected template string (at _app-f54835a384f76a9d.js:15:3257677)

Source is definitely pointing to the library's dist files image

jnsdls commented 2 years ago

hey @mhroes9627 thanks for reporting this!

Could you provide some additional information for us to be able to reproduce this, specifically your:

Even more helpful if you could provide a github repo or code sandbox that has this issue that we can clone and investigate.

mhroes9627 commented 2 years ago

Hey @jnsdls, thank you for taking the time to respond! I was able to fix the issue on our end by setting this config

swcMinify: false,

under this file So setting swcMinify to true produces the same error.

jnsdls commented 2 years ago

Hey @jnsdls, thank you for taking the time to respond! I was able to fix the issue on our end by setting this config

swcMinify: false,

under this file So setting swcMinify to true produces the same error.

thanks for the update, I'll try to reproduce the setup with turborepo and our starter project to try to fix the underlying bug.

Glad that you found a workaround for now!