wagmi: [bug] build with Nextjs, error 'Uncaught SyntaxError: Unexpected template string' occurs

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

0.2.15

Current Behavior

Demo repo:

https://github.com/liran319/next-wagmi-demo

I have install wagmi@0.2.15 into my project with Nextjs, it works well when start project with ‘yarn dev’. But Uncaught SyntaxError: Unexpected template string occurs when run ‘yarn build && yarn start’. image

It seems that only occurs on production mode.And there is no stack to debug. Could you please have a check?

Expected Behavior

Both development and production mode work well.

Steps To Reproduce

  1. Clone the repo https://github.com/liran319/next-wagmi-demo, and enter that folder;
  2. Run yarn to install deps;
  3. Run ‘yarn build && yarn start’
  4. check console, found ‘Uncaught SyntaxError: Unexpected template string’, and button doesn’t work

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

OH yes, it is! It works! But I think there is some where can be optimized and fixed on wagmi.

Thanks you very much!