Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Remove lodash dependency from frontend scripts #8642

Closed
Aljullu opened this issue Mar 6, 2023 · 0 comments · Fixed by #9161
Closed

Remove lodash dependency from frontend scripts #8642

Aljullu opened this issue Mar 6, 2023 · 0 comments · Fixed by #9161
Assignees
Labels
focus: performance The issue/PR is related to performance. type: cooldown Things that are queued for a cooldown period (assists with planning). type: technical debt This issue/PR represents/solves the technical debt of the project.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Mar 6, 2023

As Gutenberg is moving away from lodash (WordPress/gutenberg#17025), we should do the same with WC Blocks scripts. At least, with scripts loaded in the frontend, so we avoid loading lodash, which is a heavy dependency, when our blocks are rendered in the frontend.

In addition to that, we should add an ESLint rule to make sure we don't introduce new usages of lodash. Gutenberg has one that we can use as a reference:

https://github.com/WordPress/gutenberg/blob/e72bc18ce7d62bed1d9514e73f5c17631bf7ed07/.eslintrc.js#L45

@Aljullu Aljullu added focus: performance The issue/PR is related to performance. type: cooldown Things that are queued for a cooldown period (assists with planning). type: technical debt This issue/PR represents/solves the technical debt of the project. labels Mar 6, 2023
@mikejolley mikejolley self-assigned this Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: performance The issue/PR is related to performance. type: cooldown Things that are queued for a cooldown period (assists with planning). type: technical debt This issue/PR represents/solves the technical debt of the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants