Skip to content

Use es6 imports for ramda #49

Closed

Description

@andrejpavlovic

I've been migrating from react-native-render-html to this new library and one of the things I noticed is that ramda dependencies are still using deep imports. I had a patch for the old library to replace all these with es6 based imports which helped a lot with getting tree-shaking to work properly.

My suggestion would be to make those updates in the codebase.

e.g.
instead of
import mergeDeepRight from 'ramda/src/mergeDeepRight';
use
import { mergeDeepRight } from 'ramda'

Activity

  1. 5ZYSZ3K commented on Aug 11, 2026

    @5ZYSZ3K
    Collaborator

    @andrejpavlovic I missed that, thanks! I will create a PR tomorrow

  2. linked a pull request that will close this issuefix: change all ramda imports to be direct #50on Aug 13, 2026
  3. 5ZYSZ3K commented on Aug 13, 2026

    @5ZYSZ3K
    Collaborator

    @andrejpavlovic I forgot about it yesterday, but it is there now
    I'll get that merged after it gets approved by @jsamr

  4. MarkusWendorf commented on Nov 11, 2026

    @MarkusWendorf

    @andrejpavlovic could you provide an example where the tree-shaking didn't work out? I proposed to revert the change (unknowingly), because tree-shaking is not enabled by default in Expo based projects.

    It's reverting back to import mergeDeepRight from 'ramda/src/mergeDeepRight';, but I'm not sure why it didn't work you and would like to know what the issue was exactly.

    In my testing everything was working as expected with deep imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions