egoist / egoist/tsup

Support ES Module wrapper

Open
#1,008 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

It would be nice if tsup had an option to automatically create an esm wrapper around the cjs module instead of compiling the esm module.

https://nodejs.org/api/packages.html#approach-1-use-an-es-module-wrapper

This would prevent the Dual CommonJS/ES module packages bug.

https://nodejs.org/api/packages.html#dual-commonjses-module-packages

@egoist any thoughts???

Contributor guide

Open the contributing guide

Research direction

Review tsup's existing CommonJS and ESM output options, then read the linked Node.js guidance on ES module wrappers and dual packages. Define how an opt-in wrapper should behave and how completion would be verified, since the issue does not identify files, entry points, or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.