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
- docs(README.md): fix RA E56 imports Ref #456 — committed to char0n/ramda-adjunct by char0n 6 years ago
- docs(README.md): fix RA E56 imports Ref #456 — committed to char0n/ramda-adjunct by char0n 6 years ago
Like @Andarist said :
So now that consistency issues between
ramda
andramda-adjunct
are fixed, it’s ok to me.Because we looking for consistance between
RA
andRamda
, 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 supportsimport 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 andimport * as RA
is correct for this use case.