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

SWC minifier changes Temporal workflow names in turborepo setup #74332

Open
njoshi22 opened this issue Dec 27, 2024 · 0 comments
Open

SWC minifier changes Temporal workflow names in turborepo setup #74332

njoshi22 opened this issue Dec 27, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. SWC Related to minification/transpilation in Next.js.

Comments

@njoshi22
Copy link

Link to the code that reproduces this issue

https://github.com/njoshi22

To Reproduce

  1. Create Next app as apps/web
  2. Create separate temporal packages for activities and workflows
  3. Create temporal client as part of an API route apps/web and import one of the workflows from the workflows package
  4. Call the temporal workflow from the NextJS client API route

Current vs. Expected behavior

SWC minifies Temporal workflow name and it cannot be resolved against the actual workflow name within the Temporal environment. The only fix for this is to set swcMinify: false in next.config.js, and update manual webpack config with Terser to set keep_fnames: true.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.2.0: Fri Dec  6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.15.1
  npm: 10.7.0
  Yarn: 1.22.19
  pnpm: 9.12.1
Relevant Packages:
  next: 14.2.18 // An outdated version detected (latest is 15.1.3), upgrade is highly recommended!
  eslint-config-next: 14.2.5
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A

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

SWC

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

next build (local), next start (local), Vercel (Deployed)

Additional context

Tested this against next 14 and 15 builds

@njoshi22 njoshi22 added the bug Issue was opened via the bug report template. label Dec 27, 2024
@github-actions github-actions bot added the SWC Related to minification/transpilation in Next.js. label Dec 27, 2024
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. SWC Related to minification/transpilation in Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant