Skip to content

Replace lodash with es-toolkit to remove deprecated dependency and CommonJS optimization bailouts #253

Description

@denatys

Replace lodash with es-toolkit using its compatibility layer: https://es-toolkit.dev/compatibility.html

Why

  1. lodash is outdated / legacy dependency
    • lodash is still widely used, but many projects are migrating away from it in favor of modern, tree-shakeable, ESM-friendly alternatives.
    • Native JavaScript now covers many historical lodash use cases.
  2. Build warning caused by CommonJS modules
    Current build shows:
Warning: /node_modules/@remoteoss/json-schema-form/dist/index.js depends on 'lodash/flow'. CommonJS or AMD dependencies can cause optimization bailouts.
  1. Better bundle optimization
    • es-toolkit provides ESM support.
    • Better tree-shaking.
    • Cleaner long-term dependency strategy.

Proposed Solution

Replace direct lodash imports and aliases with es-toolkit/compat equivalents.

Examples:

import flow from 'lodash/flow'

→

import { flow } from 'es-toolkit/compat'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions