Category "tree-shaking"

How to perform tree shaking for lodash in a create-react-app project?

I need to perform tree-shaking to reduce bundle sizes where lodash and some other libraries are being used. I've converted all lodash imports like this: import

Best practice to publish src folder that contains esm modules

Consider this package.json: { "main": "./index.js", "name": "@myorg/foo", "scripts": { "build": "babel src -d dist --delete-dir-on-start --source-maps