ramda-adjunct: import RA default export doest not works

default export seems to not works like ramda does.

import RA from 'ramda-adjunct' // RA is undefined
import R from 'ramda' // R is OK

import * as RA from 'ramda-adjunct' // RA is OK
import * as R from 'ramda' // R is OK

I don’t understand why, maybe need to investigate https://github.com/ramda/ramda/blob/master/.babelrc

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Like @Andarist said :

You are not supposed to be able to import default from RA, it’s a namespace library.

So now that consistency issues between ramda and ramda-adjunct are fixed, it’s ok to me.

Because we looking for consistance between RA and Ramda, I think we should export default too.

Yes the current behavior * as RA is due to the tree shaking. We can add additional mechanism that supports import RA from 'ramda-adjunct' but now we don’t support. I’ll fix the documentation to reflect that.

How do u consume ramda-adjunct? node? webpack? rollup? other?

btw. I strongly believe this is expected behaviour. You are not supposed to be able to import default from RA, it’s a namespace library and import * as RA is correct for this use case.