Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][v13.5]build with terser error(Unexpected token: punc ({)) #66561

Open
henrycjchen opened this issue Jun 5, 2024 · 1 comment
Open

[Bug][v13.5]build with terser error(Unexpected token: punc ({)) #66561

henrycjchen opened this issue Jun 5, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template. Webpack Related to Webpack with Next.js.

Comments

@henrycjchen
Copy link

henrycjchen commented Jun 5, 2024

Link to the code that reproduces this issue

https://github.com/henrycjchen/next-13-terser-issue

To Reproduce

  1. npm run build

Current vs. Expected behavior

current:

  • show error(Unexpected token: punc ({)) when build

expected:

  • can build successfully

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020
Binaries:
  Node: 16.20.2
  npm: 8.19.4
  Yarn: 1.22.21
  pnpm: 7.33.1
Relevant Packages:
  next: 13.5.6
  eslint-config-next: 13.5.6
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Webpack

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

It happens when there is a class with static props.

@henrycjchen henrycjchen added the bug Issue was opened via the bug report template. label Jun 5, 2024
@github-actions github-actions bot added the Webpack Related to Webpack with Next.js. label Jun 5, 2024
@ytw0728
Copy link

ytw0728 commented Sep 20, 2024

I am meeting this same issue on 13.5.6 / 13.5.7 with swcMinify: false option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Webpack Related to Webpack with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants