vercel / vercel/next.js

@next/swc-darwin-arm64 is duplicated in every instance of Next.JS and the size in disk is huge

Open
#79,770 4 comments 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

SWC
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/RodrigoTomeES/bug-nextjs-api-polyfill

To Reproduce

Ignore the link, just install the nextjs package

bunx create-next-app@latest

Current vs. Expected behavior

Right now the binary is in every instance of a Next.JS project it would be great if the binary is located in a shared route of the computer instead of having the "same" binary every time.

I don't know if this will be possible, but it will be a great improvement.

Image

Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:25 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 22.11.0
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: 9.15.1
Relevant Packages:
  next: 15.2.4 // There is a newer version (15.3.2) available, upgrade recommended! 
  eslint-config-next: 15.1.7
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.7.3
Next.js Config:
  output: standalone
 ⚠ There is a newer version (15.3.2) available, upgrade recommended! 
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue
Which area(s) are affected? (Select all that apply)

SWC

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

Other (Deployed)

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the installation with bunx create-next-app@latest and inspect where @next/swc-darwin-arm64 is placed in repeated Next.js projects, including the output: standalone case. Determine whether a shared location is feasible for the package and define completion as avoiding unnecessary duplicate binaries without breaking project isolation or deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs
Domain
build-system, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.