Skip to content

mjackson/esbuild-node-builtins-sideeffects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo shows how esbuild leaves the import for unused node builtins in the output bundle.

To reproduce:

$ npm install
$ npm run build

Then inspect output.js.

Now switch the import in input.js to import from ./local-fs instead of fs. Run the build again and you should not see the import in the output because there is a sideEffects: false in package.json.

It'd be nice if esbuild used an implicit sideEffects: false for node builtins since they are purely library code and don't have any side effects.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published