vercel / vercel/ncc

Minification bails out for rollup-plugin-commonjs

Open
#485 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

While working on https://github.com/osdevisnot/klap, I noticed that final bundle is not minified, resulting in larger payloads on install.

Digging this deeper, I narrowed the problem down to rollup-plugin-commonjs. The moment this package is used, the final bundle is unminified for some reason.

I was able to produce minimal repro of the problem here:
https://github.com/osdevisnot/ncc-minify-repro

I am digging deeper to solve this, but wanted to open issue in case someone else has this figured out already.

Contributor guide

No contributing guide indexed for this repository

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 report with the minimal example in osdevisnot/ncc-minify-repro, then inspect how ncc interacts with rollup-plugin-commonjs during bundling and minification. Done means the final bundle produced with rollup-plugin-commonjs is minified rather than left unminified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rollup
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.