Skip to content

monsieurnebo/ramda-tree-shaking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ramda tree shaking tests

This repo is used for ramda tree shaking tests.

Comment / uncomment import methods in index.js:

// No tree shaking (200+ modules, heavy weight)
// import * as R from 'ramda'
// import { identity } from 'ramda'

// Working tree shaking (4 modules, lightweight)
// import identity from 'ramda/src/identity'

// Weird tree shaking (4 modules, but heavy weight)
// import identity from 'ramda/es/identity'

Then, execute the following command to compare results:

ANALYZE=true npm run build

See the related issue for more informations.

About babel-plugin-ramda

In order to enable babel-plugin-ramda, please create a .babelrc file:

// .babelrc
{
  "presets": [
    ["next/babel", {
      "ramda": {
        "useES": true
      }
    }]
  ]
}

And use the import identity from 'ramda/es/identity' import method.

About

Sandbox repo for ramda tree shaking tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published