Closed Bug 1513527 Opened 5 years ago Closed 5 years ago

Switch from lodash to lodash-es

Categories

(Tree Management :: Treeherder: Frontend, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: emorley, Unassigned)

References

Details

Attachments

(1 file)

Since it allows webpack to tree shake unused modules, thereby saving us from including all of the parts of lodash we don't use in the bundle shipped to users.

The Travis run on the linked PR is failing - I believe due to quirks with karma-webpack which should go away once we migrate fully to Jest.

Depends on: 1364045

No longer depends on bug 1364045 (finishing the migration from Karma to Jest), since I found an easy workaround for Karma.

However Jest's current lack of ESM (ES modules) causes test failures. Resolving would require either:

  • telling Neutrino to make Babel transpile dependencies too (and not just our own code), which isn't ideal from a test-prod parity and perf point of view
  • waiting for Jest's native ESM support: https://github.com/facebook/jest/issues/4842

The latter seems more appealing.

Also if lodash 5 ends up being released before that happens, then this bug can be wontfixed and the existing lodash package just updated to v5, which is due to use ES modules anyway.

Assignee: emorley → nobody
Status: ASSIGNED → NEW
No longer depends on: 1364045
Priority: P1 → P3
Summary: Switch to lodash-es → Switch from lodash to lodash-es

Let's not bother with this for now, seeing as lodash 5 will resolve the issue more easily.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: