Skip to content

Exercise in publishing a modern ESM based package with SWC

Notifications You must be signed in to change notification settings

audunolsen/sheepit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ditching the bundler // SWC over Rollup

We do not need bundling — esm is the de facto module standard. It is the consuming environents responsibility to optimize deps if necessary,just as vite does. Bundling just to support commonJS adds a ton of headaches that are simply not worth the tradeoff.

This package uses SWC to compile. SWC is used over ESbuild for its ability to include just a directory which it recreates in a distribution-folder. ESbuild needs explicit inputs and outputs glob patterns in a flat manner. Neither SWC nor ESbuild generates declaration files. This will as of now still need to be produced by tsc. SWC will eventually support this through STC (Speedy type checker).

About

Exercise in publishing a modern ESM based package with SWC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published