DEV Community


Discussion on: Monorepos: Lerna, TypeScript, CRA and Storybook combined

krishnaspotnana profile image

Thanks for this great article. Why do we have lib-esm and lib folders. What happens If I remove lib folder? Just curious.

Thread Thread
shnydercom profile image
shnyder Author

we're building against two target versions of javascript, one with ECMA Script Modules ('esm'), the other with a (one of the) module system that existed before. When people start using your library, the different entrypoints to your lib that are defined in package.json make sure that you don't break compatibility. Check out the media coverage of the 'is-promise' library if you want to see what impact a change to the module system can have ;)