rollup / rollup/rollup

cjs outputs with esm chunks

Open
#4,968 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

t³ ✨ enhancement t⁸ ⋅ triage
Dominant language
JavaScript
Stars
26.3k
Forks
1.8k
Avg merge
2d 11h
Merged PRs (30d)
20

Description

Feature Use Case

dynamic import is supported in cjs at the same time, so when using import(pathFoo) I'd like to keep pathFoo's output chunk as esm format, so that it can be shared with the esm output.

Feature Proposal

As above.

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

No files, tests, or entry points are named. Start by mapping how Rollup handles dynamic import in CJS output and how ESM chunks are shared between outputs; done means supporting the proposed CJS dynamic import while preserving the imported chunk as ESM.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.